Wrapper for documo https://docs.documo.com/
composer require toancong/mdoc
// obtain api key
$apiKey = env('MDOC_API_KEY')
// instance client
$client = new \Bean\Mdoc\Client($apiKey);
// Returns your detailed user data.
$response = $client->me->get();
// Get all users for account
$response = $client->users->get();
// Get some other paths using magic
// change specific version
$response = $client->coverpages->version('')->get();
// other api path
$response = $client->other->path('fax/history')->get();
$response = $client->other->path('fax/history')->getClient()->requestWithAuth('get', 'v1/fax/history');
// other method
$response = $client->other->getClient()->requestWithAuth('post', 'v1/users', [
'form_params' => [
'firstName' => 'John',
'lastName' => 'Doe',
'email' => '[email protected]',
'password' => 'c.ZQdgm3WAka',
]
]);
// Send a fax
$response = $client->other->getClient()->requestWithAuth('post', '/v1/faxes', [
'multipart' => [
[
'name' => 'faxNumber',
'contents' => '+12456789000',
],
[
'name' => 'attachments',
'contents' => fopen('/path/to/file', 'r'),
],
]
]);
MIT