<p align="center">
<a href="https://github.com/Mane-Olawale/rest-response"><img src="https://github.com/Mane-Olawale/rest-response/actions/workflows/tests.yml/badge.svg" alt="Github"></a>
<a href="https://packagist.org/packages/Mane-Olawale/rest-response"><img src="https://img.shields.io/packagist/dt/Mane-Olawale/rest-response" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/Mane-Olawale/rest-response"><img src="https://img.shields.io/packagist/v/Mane-Olawale/rest-response" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/Mane-Olawale/rest-response"><img src="https://img.shields.io/packagist/l/Mane-Olawale/rest-response" alt="License"></a>
</p>

# Rest Response

<p align="center">
    <img title="Usage Example" src="https://raw.githubusercontent.com/Mane-Olawale/rest-response/main/sample.png"/>
</p>

Extended response classes for Rest API clients/SDKs.

## About
This package is intended to be component of SDKs so the responses can be easily worked with.
it support callbacks for handling errors or success, provides methods to check status code better and working with lists and paginations.

Extends [Guzzle Response](https://github.com/guzzle/psr7/blob/master/src/Response.php).


## Requirements

* PHP >= 7.2
* Guzzlehttp ~6|~7

## Installation

Via [Composer](https://getcomposer.org).

### PHP 7.2+:

```bash
composer require mane-olawale/rest-response
```


You now have Rest Response Classes in *vendor/mane-olawale/rest-response*

And an handy autoload file to include in your project in *vendor/autoload.php*


## Usage

`I will document it when i have strength`
