PHP code example of schenke-io / api-client
1. Go to this page and download the library: Download schenke-io/api-client 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/ */
schenke-io / api-client example snippets
#app/MyClass.php
class MyClass extends BaseClient {
public function getAuthHeader(): array
{
return [
'Authorization: Bearer <YOUR-TOKEN>'
];
}
}
#app/MyClass.php
$api = new MyClass('https://example.com/api/v2/');
$result = $api->get('/users');
print_r($result);