PHPackages                             thojou/php-simple-api-client - 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. thojou/php-simple-api-client

ActiveLibrary

thojou/php-simple-api-client
============================

A PHP library for simple rest api client creation.

07821PHP

Since Oct 6Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Simple Client Api
=====================

[](#php-simple-client-api)

[![Static Badge](https://camo.githubusercontent.com/dd091876be639883d3ec7a5910e3a61fc9f952106be8483268cf06706590b008/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505f56657273696f6e2d253345253344382e312d626c7565)](https://camo.githubusercontent.com/dd091876be639883d3ec7a5910e3a61fc9f952106be8483268cf06706590b008/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505f56657273696f6e2d253345253344382e312d626c7565)[![CI](https://github.com/thojou/php-simple-api-client/actions/workflows/ci.yml/badge.svg)](https://github.com/thojou/php-simple-api-client/actions/workflows/ci.yml)[![Coverage](https://camo.githubusercontent.com/0c967d746eb7f4fe28065a3b94d23faa207cd6f4a968535b20fce0310a87cf89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d677265656e)](https://camo.githubusercontent.com/0c967d746eb7f4fe28065a3b94d23faa207cd6f4a968535b20fce0310a87cf89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d677265656e)[![License](https://camo.githubusercontent.com/d2b8cd4adde81ac810e9773245d69580b193d64fe2fb4d10684cb47c9a656069/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74686f6a6f752f7068702d73696d706c652d6170692d636c69656e74)](./LICENSE)

**PHP Simple Client API** is a lightweight PHP library for building REST API clients easily. It simplifies making HTTP requests, handling responses, and managing API interactions.

Requirements
------------

[](#requirements)

- PHP version &gt;= 8.1
- [GuzzleHttp](https://github.com/guzzle/guzzle) &gt;= 7.8

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

[](#installation)

You can effortlessly install the **PHP Simple Client Api** using the popular package manager [composer](https://getcomposer.org/).

```
composer require thojou/php-simple-api-client:dev-master
```

Usage
-----

[](#usage)

To start implementing your REST API client with the Simple API Client library, follow these steps:

### Quick Start

[](#quick-start)

#### 1. Create Your API Class

[](#1-create-your-api-class)

Extend the `Thojou\SimpleApiClient\AbstractApi` class to create your API client class. Implement the onSuccessResponse, onRedirectResponse, and onErrorResponse methods to handle different types of responses.

```
