The Ittybit PHP library provides convenient access to the Ittybit API from PHP.
Requirements
Use of the Ittybit PHP SDK requires:
- PHP ^8.1
Installation
Use Composer to configure and install the Ittybit PHP SDK:
Usage
Instantiation
To get started with the Ittybit SDK, instantiate the IttybitClient
class as follows:
Configuration Options
The SDK allows you to configure various options when creating the client:
Available Clients
The SDK provides several specialized clients for different API areas:
Exception Handling
When the API returns a non-success status code (4xx or 5xx response), an exception will be thrown:
Advanced
Custom HTTP Client
This SDK is built to work with any HTTP client that implements Guzzle's ClientInterface
. By default, if no client
is provided, the SDK will use Guzzle's default HTTP client. However, you can pass your own client that adheres to
ClientInterface
: