PHPackages                             staskjs/simple-api - 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. staskjs/simple-api

ActiveLibrary[API Development](/categories/api)

staskjs/simple-api
==================

Library for creating simple api wrappers for php

1.3.0(8y ago)23.4kPHP

Since Mar 23Pushed 8y ago3 watchersCompare

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

READMEChangelogDependencies (1)Versions (8)Used By (0)

Simple API
==========

[](#simple-api)

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

[](#installation)

```
composer require staskjs/simple-api

```

Usage
-----

[](#usage)

Create class for your api wrapper.

```
use Staskjs\SimpleApi\SimpleJsonApi;

class GithubApi extends SimpleJsonApi {

    // Headers for each request
    protected $headers = [
        'Authorization' => 'token TOKEN',
    ];

    // Specify default query params for each request (for example this can be api version or api token)
    protected $default_query = [
    ];

    public function getUsers() {
        return $this->request('GET', 'users');
    }
}

// ...

$api = new GithubApi('https://api.github.com');

$success = $api->getUsers();

// If http query was successful
if ($success) {
    $data = $api->getData();
}
else {
    $errors = $api->getErrors();
}

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~85 days

Total

7

Last Release

2981d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/419da54cc61c11c07e8c444043a761f6939dc1e56df11dfce5c5395474eee32f?d=identicon)[staskjs](/maintainers/staskjs)

---

Top Contributors

[![trikey](https://avatars.githubusercontent.com/u/1786102?v=4)](https://github.com/trikey "trikey (2 commits)")[![staskjs](https://avatars.githubusercontent.com/u/1155633?v=4)](https://github.com/staskjs "staskjs (1 commits)")

### Embed Badge

![Health badge](/badges/staskjs-simple-api/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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