PHP code example of yuca / basic-api-client

1. Go to this page and download the library: Download yuca/basic-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/ */

    

yuca / basic-api-client example snippets


$client = new Yuca\BasicApiClient([
    'baseUrl' => 'https://example.com/api',
    'username' => 'username',
    'password' => 'password',
    'return' => 'array', // object or array
]);

$client->get('articles', ['limit' => 10]);

$client->post('article/create', ['title' => 'Awesome!']);