Skip to content

ner0tic/php-api-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-api-core

ORM agnostic php library to access REST apis

Usage

use Ner0tic\ApiEngine\Api\AbstractApi;

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

If you have api keys to use, mash them into a pem file and set the certificate option to the path of the file.

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

Make a query

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

Working example:

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

About

core structure for a plug and play style api walker

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages