Download the PHP package gamepanelio/spiget-api without Composer
On this page you can find all versions of the php package gamepanelio/spiget-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gamepanelio/spiget-api
More information about gamepanelio/spiget-api
Files in gamepanelio/spiget-api
Package spiget-api
Short Description A PHP implementation of the Spiget.org API
License MIT
Informations about the package spiget-api
Spiget.org PHP API Client
This library is a basic PHP implementation of the Spiget.org API.
Installation
This library uses the HTTPlug HTTP client abstraction library - meaning you can use your favourite HTTP library with it!
For a quick and easy way to use this library in your project, via composer, run the following:
There are also lots of different libraries that you can use with HTTPlug. To see how to use different libraries please refer to the HTTPlug documentation.
Usage
Simply instantiate a new Spiget()
class, and use the methods it provides:
Return Data
Each method returns a PSR-7 Response.
API Errors and Exceptions
Any response which is not successful (HTTP code <200>=300) will throw a ApiCommunicationException
.
If you are using a library that throws PSR-7 errors for such responses (for example, Guzzle), they will be wrapped and
you can access the PSR-7 exception via the ->getPrevious()
method.
Naming Conventions
Each method provided by the Spiget
class has a naming convention of the following format:
License
This library is licensed under the MIT license. See the LICENSE
file for more info.
All versions of spiget-api with dependencies
php-http/httplug Version ^1.0
php-http/message-factory Version ^1.0
php-http/discovery Version ^1.0