PHPackages                             filippo-toso/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. filippo-toso/api-sdk

ActiveLibrary[API Development](/categories/api)

filippo-toso/api-sdk
====================

A lightweight SDK to develop REST API clients

v2.0.1(2y ago)01.3k13MITPHPPHP ^8.0 || ^9.0

Since Jan 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/filippotoso/api-sdk)[ Packagist](https://packagist.org/packages/filippo-toso/api-sdk)[ RSS](/packages/filippo-toso-api-sdk/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (6)Used By (3)

Api SDK
=======

[](#api-sdk)

A lightweight SDK to develop REST API clients

Installing
----------

[](#installing)

Use Composer to install it:

```
composer require filippo-toso/api-sdk

```

How does it work?
-----------------

[](#how-does-it-work)

The best way is to start with an example. Let's build an SDK for Windy.com APIs.

First we build the main class:

```
use FilippoToso\Api\Sdk\Sdk;

class Windy extends Sdk
{
    public function list(): ListEndpoint
    {
        return new ListEndpoint($this);
    }
}
```

The `Windy` exposes a `list()` method that implements the  calls. You can implement how many endpoints you want (i.e. `map`).

Then let's write the code to call the endpoint:

```
use FilippoToso\Api\Sdk\Endpoint;
use FilippoToso\Api\Sdk\Support\Response;

class ListEndpoint extends Endpoint
{
    public function nearby($latitude, $longitude, $radius = 10): Response
    {
        return $this->get('/list/nearby=' . $latitude . ',' . $longitude . ',' . $radius . '?' . http_build_query($this->params([
            'show' => 'webcams:location,image',
        ])));
    }
}
```

The ListEndpoint exposes the nearby() methods. An endpoint class can expose as many methods as you need (i.e. one for each REST call).

Finally, let's call the service:

```
use FilippoToso\Api\Sdk\Support\Options;

include(__DIR__ . '/../vendor/autoload.php');

include(__DIR__ . '/ListEndpoint.php');
include(__DIR__ . '/Windy.php');

$options = new Options([
    'uri' => 'https://api.windy.com/api/webcams/v2',
    'headers' => [
        'x-windy-key' => '...',
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
]);

$windy = new Windy($options);

$response = $windy->list()->nearby(45.9035644, 13.3038818, 10);

print_r($response->body());
```

The Options class allows you to specify multiple options (i.e. a production Vs. development url). Check the sources for more information on all the options available.

That's it. A flexible and clean implementation of an API SDK.

Source of inspiration
---------------------

[](#source-of-inspiration)

This SDK is heavily inspired by this article series:

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~90 days

Total

5

Last Release

905d ago

Major Versions

v1.0.2 → v2.0.02024-01-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/55d89f2d44fb12225de2119994028ee69e36770bcf33c2b1ddf0d6672d28151b?d=identicon)[filippo.toso](/maintainers/filippo.toso)

---

Top Contributors

[![filippotoso](https://avatars.githubusercontent.com/u/26958813?v=4)](https://github.com/filippotoso "filippotoso (6 commits)")

### Embed Badge

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

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60216.0M83](/packages/mollie-mollie-api-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M418](/packages/drupal-core-recommended)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

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