Download the PHP package elife/api-sdk without Composer
On this page you can find all versions of the php package elife/api-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elife/api-sdk
More information about elife/api-sdk
Files in elife/api-sdk
Informations about the package api-sdk
eLife API SDK for PHP
This library provides a PHP SDK for the eLife Sciences API.
It includes code from the CsaGuzzleBundle for testing, which in the future will be a normal dependency (see csarrazi/CsaGuzzleBundle#169).
Dependencies
- Composer
- PHP 7
Running tests
To run all tests locally:
Installation
Execute composer require elife/api-sdk.
Usage (ApiClient)
The eLife\ApiSdk\ApiClient namespace provides separate clients for each part of the eLife API.
Each method on an API client represents an endpoint.
You can pass default headers to an API client, and/or to each API client method. You should provide an Accept header stating which versions you support.
API clients always return instances of GuzzleHttp\Promise\PromiseInterface, which wrap instances of eLife\ApiClient\Result, which in turn wrap the JSON response.
eLife\ApiClient\Result provides integration with the JMESPath (using jmespath.php), to allow easy searching of JSON responses.
Basic example
To list the Labs Post IDs that appear on the first page of the endpoint:
All versions of api-sdk with dependencies
composer/package-versions-deprecated Version 1.11.99.2
elife/api-client Version dev-master
guzzlehttp/promises Version ^2.4.0
guzzlehttp/psr7 Version ^2.10.1
symfony/serializer Version ^5.0 || ^6.0 || ^7.0 || ^8.0