PHP code example of ner0tic / php-api-core

1. Go to this page and download the library: Download ner0tic/php-api-core 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/ */

    

ner0tic / php-api-core example snippets


use Ner0tic\ApiEngine\Api\AbstractApi;

$api = new AbstractApi();
$client = $api->getClient();

$client->setOption('certificate', $pem_file);

$result = $api->get($endpoint, $parameters, $request_options);

use Ner0tic\ApiEngine\Api\AbstractApi();

$api = new AbstractApi();
$client = $api->getClient();

$users = $client->get('users', array('last_name' => 'smith'));

foreach($users as $user)
  $user = new \Acme\UserBundle\Entity\User($user);

// ... use $users as needed