PHP code example of openclerk / api-list
1. Go to this page and download the library: Download openclerk/api-list library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
openclerk / api-list example snippets
class MyApiListApi extends \Apis\ApiList\ApiListApi {
function getAPIs() {
return \DiscoveredComponents\Apis::getAllInstances();
}
}
$lister = new \Apis\ApiList\ApiLister();
$apis = $lister->processAPIs(\DiscoveredComponents\Apis::getAllInstances());
foreach ($apis as $api) {
print_r(array(
$api['endpoint'],
$api['title'],
$api['description'],
$api['params'], // array
// ...
));
}