Download the PHP package sauls/xkcd-api-client without Composer
On this page you can find all versions of the php package sauls/xkcd-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package xkcd-api-client
Sauls xkcd api client
Sauls xkcd.com api client.
Requirements
PHP >= 7.2
Installation
Using composer
Apppend the composer.json file manually
Client configuration
Client default configuration that can be overridden by passing new values on client creation.
The info object
This object is returned when you call the getLatest
, getRandom
and get($num)
methods
Usage without cache
Usage with cache
Uses symfony/cache
component to cache the responses. For how to configure the cache see symfony/cache component documentation
Exceptions
ComicNotFoundException
- is thrown when requested comic was not found e.g. the xkcd api returns404
responseServiceDownException
- is thrown on all other response statusesXkcdClientException
- is thrown when there is something wrong with your configuration or when errors occur.
All versions of xkcd-api-client with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2
guzzlehttp/guzzle Version ^6.0
symfony/cache Version ^4.0
sauls/helpers Version ^1.0
sauls/options-resolver Version ^1.0
guzzlehttp/guzzle Version ^6.0
symfony/cache Version ^4.0
sauls/helpers Version ^1.0
sauls/options-resolver Version ^1.0
The package sauls/xkcd-api-client contains the following files
Loading the files please wait ....