Download the PHP package memuya/fabdb-php-sdk without Composer
On this page you can find all versions of the php package memuya/fabdb-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download memuya/fabdb-php-sdk
More information about memuya/fabdb-php-sdk
Files in memuya/fabdb-php-sdk
Package fabdb-php-sdk
Short Description A library to communicate with the fabdb.net API.
License
Informations about the package fabdb-php-sdk
⚠️ Notice
https://fabdb.net is shutting down.
Flesh and Blood (fabdb.net) API library
A library to communicate with the fabdb.net API.
Installation
This library can be installed via composer.
Usage
The quickest way to get started is to use the Client
through the FleshAndBlood
class. FleshAndBlood
is a wrapper to easily call all endpoints the fabdb.com API has to offer.
A new instance can be created by creating a Client
object.
You can then pass the client to the FleshAndBlood
instance.
Note that you can use the Client
object directly to have more control. See examples below for more information.
Formatter
You can change the response format by passing a Formatter
to the client. By default, JsonFormatter
is used. This is used to also populate the Accept
request header.
Please note that the API does not seem to honor anything but JSON in the Accept
header. This means only JsonFormatter
should be used.
List of formatters:
You can use a formatter via the contructor or the setter method:
List of Cards
Returns a paginated list of cards. The list of cards can be filtered down using the CardsConfig
object. See below example for all filtering options. All filtering options are optional. If a filter is not valid, an InvalidCardConfigException
exception in thrown.
For a full list of options please see the API documentation.
FleshAndBlood
object example:
Client
object example:
Return a Card
Search for a card using its identifier.
FleshAndBlood
object example:
Client
object example:
Decks
Return information on a given deck.
FleshAndBlood
object example:
Client
object example: