PHP code example of nekofar / nobitex

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

    

nekofar / nobitex example snippets


use \Nekofar\Nobitex\Client;
use \Nekofar\Nobitex\Config;

$config = Config::doAuth('username', 'password')
$client = Client::create($config)

try {
    $profile = $client->getUserProfile();

    echo 'Email: ' . $profile->email . PHP_EOL;
    echo 'Last name: ' . $profile->lastName . PHP_EOL;
    echo 'First name: ' . $profile->firstName . PHP_EOL;

} catche (\Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
bash
composer