PHPackages                             elife/api-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. elife/api-sdk

ActiveLibrary[API Development](/categories/api)

elife/api-sdk
=============

eLife Sciences API SDK

031.9k↓30%3[12 PRs](https://github.com/elifesciences/api-sdk-php/pulls)1PHPCI passing

Since Apr 13Pushed 1mo ago8 watchersCompare

[ Source](https://github.com/elifesciences/api-sdk-php)[ Packagist](https://packagist.org/packages/elife/api-sdk)[ RSS](/packages/elife-api-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (26)Used By (1)

eLife API SDK for PHP
=====================

[](#elife-api-sdk-for-php)

This library provides a PHP SDK for the [eLife Sciences API](https://github.com/elifesciences/api-raml).

It includes code from the [CsaGuzzleBundle](https://github.com/csarrazi/CsaGuzzleBundle) for testing, which in the future will be a normal dependency (see [csarrazi/CsaGuzzleBundle#169](https://github.com/csarrazi/CsaGuzzleBundle/issues/169)).

Dependencies
------------

[](#dependencies)

- [Composer](https://getcomposer.org/)
- PHP 7

Running tests
-------------

[](#running-tests)

To run all tests locally:

```
make test

```

Installation
------------

[](#installation)

Execute `composer require elife/api-sdk`.

Usage (ApiClient)
-----------------

[](#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](http://jmespath.org/) (using [jmespath.php](https://github.com/jmespath/jmespath.php)), to allow easy searching of JSON responses.

### Basic example

[](#basic-example)

To list the Labs Post IDs that appear on the first page of the endpoint:

```
use eLife\ApiSdk\ApiClient\LabsClient;
use eLife\ApiClient\HttpClient\Guzzle6HttpClient;
use eLife\ApiClient\MediaType;
use GuzzleHttp\Client as Guzzle;

$guzzle = new Guzzle(['base_uri' => 'https://api.elifesciences.org/']);
$httpClient = new Guzzle6HttpClient($guzzle);
$labsClient = new LabsClient($httpClient);

var_dump($labsClient->listPosts(['Accept' => new MediaType(LabsClient::TYPE_POST_LIST, 1)])->wait()->search('items[*].id'));
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance59

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/375812?v=4)[Scott Aubrey](/maintainers/scottaubrey)[@scottaubrey](https://github.com/scottaubrey)

---

Top Contributors

[![thewilkybarkid](https://avatars.githubusercontent.com/u/1784740?v=4)](https://github.com/thewilkybarkid "thewilkybarkid (163 commits)")[![LinaKind](https://avatars.githubusercontent.com/u/67826881?v=4)](https://github.com/LinaKind "LinaKind (53 commits)")[![nlisgo](https://avatars.githubusercontent.com/u/383397?v=4)](https://github.com/nlisgo "nlisgo (46 commits)")[![scottaubrey](https://avatars.githubusercontent.com/u/375812?v=4)](https://github.com/scottaubrey "scottaubrey (42 commits)")[![davidcmoulton](https://avatars.githubusercontent.com/u/2893480?v=4)](https://github.com/davidcmoulton "davidcmoulton (30 commits)")[![giorgiosironi](https://avatars.githubusercontent.com/u/160299?v=4)](https://github.com/giorgiosironi "giorgiosironi (17 commits)")[![smoqadam](https://avatars.githubusercontent.com/u/1223848?v=4)](https://github.com/smoqadam "smoqadam (12 commits)")[![stephenwf](https://avatars.githubusercontent.com/u/8266711?v=4)](https://github.com/stephenwf "stephenwf (4 commits)")[![lsh-0](https://avatars.githubusercontent.com/u/2142748?v=4)](https://github.com/lsh-0 "lsh-0 (3 commits)")[![erkannt](https://avatars.githubusercontent.com/u/19282025?v=4)](https://github.com/erkannt "erkannt (3 commits)")[![viktoria-mahmud](https://avatars.githubusercontent.com/u/111341278?v=4)](https://github.com/viktoria-mahmud "viktoria-mahmud (2 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (2 commits)")[![gnott](https://avatars.githubusercontent.com/u/1779115?v=4)](https://github.com/gnott "gnott (2 commits)")[![discodavey](https://avatars.githubusercontent.com/u/745794?v=4)](https://github.com/discodavey "discodavey (1 commits)")

### Embed Badge

![Health badge](/badges/elife-api-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/elife-api-sdk/health.svg)](https://phpackages.com/packages/elife-api-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
