PHPackages                             twentytwo-labs/api-service - 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. twentytwo-labs/api-service

AbandonedArchivedLibrary[API Development](/categories/api)

twentytwo-labs/api-service
==========================

1.0.1(3y ago)072PHPPHP &gt;=8.0

Since May 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/TwentytwoLabs/api-service)[ Packagist](https://packagist.org/packages/twentytwo-labs/api-service)[ RSS](/packages/twentytwo-labs-api-service/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (16)Versions (4)Used By (0)

API Service
===========

[](#api-service)

This component read API service descriptions written in [OpenAPi/Swagger 2.0](https://github.com/OAI/OpenAPI-Specification)in order serialize requests, and parse responses into easy to use model structures.

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

[](#dependencies)

This component rely on well known interfaces that discribe:

- An HTTP client, using interfaces provided by [HTTPlug](http://httplug.io/)
- HTTP Messages, using the [PSR-7: HTTP message interfaces](http://www.php-fig.org/psr/psr-7/)
- Cache (used to cache schema files), using the [PSR-6: Caching Interface](http://www.php-fig.org/psr/psr-6/)

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

[](#installation)

This library can be easily installed via composer

```
composer require twentytwo-labs/api-service

```

Usage
-----

[](#usage)

In order to consume an API, you will need to write an API service description.

As of now, we only support swagger files, but we plan to support RAML 1.0 and Api Blueprint in a near future.

For standalone projects usage of the provided builder is encouraged:

```
