README

APIcaller is a class that helps you build API wrappers.
You don't have to worry about building URLs, or even about parsing the requested data.

How to use

You will have to extend the Client class and the Caller class, the Client will handle all the
configuration to use on the requests and the Caller will be used as the interface to interact with the API.

This will call the following url:http://api.domain.com/v1/some-method.json?ip=8.8.8.8&foo=13&bar=37.

Installation

To install the SDK, you will need to be using Composer in your project. If you don't have composer
installed check this page and follow the installation steps

This library is not hard coupled to Guzzle or any other library that sends HTTP messages.
It uses an abstraction called HTTPlug.
This will give you the flexibility to choose what PSR-7 implementation and HTTP client to use.

Why do I need to require all those packages?

APICaller depends on the virtual package php-http/client-implementation
which requires to you install an adapter, but we do not care which one.
That is an implementation detail in your application.
We also need a PSR-7 implementation and a message factory.

You don't have to use the php-http/curl-client if you don't want to.
Read more about the virtual packages, why this is a good idea and about the flexibility it brings at the HTTPlug docs.