dmk1991/albion-online-php-api

A simple API for integrating with the simple Albion gameinfo Web API.

v0.1.1 2017-08-13 04:03 UTC

README

A simple PHP API for integrating with the Albion gameinfo Web API.

Documentation is currently a work in progress and will become more robust as time allows.

Requirements:

  • PHP 7.0+

Getting Started:

This section will go over a basic implementation of the Albion Online PHP API. For a more detailed review of specific clients and methods please skip ahead to the Clients section.

Begin by requiring the package using Composer. (If you do not wish to use Composer, you can always clone the GitHub repository.)

composer require dmk1991/albion-online-php-api 

Within a PHP file, pull in the full API and new up an instance.

use Albion\AlbionApi;
$albion = new AlbionApi();

From here we can now interact with any of the available package clients. For this example we will use the game info client. The package has been designed to allow for fluent chaining of methods off of a client. All method chains should end with either ->get() or ->first() as these methods actually return the data back to the caller.

$client = $albion->gameInfoClient();

$data = $client->recentEvents()->get();

or

$albion->gameInfoClient()->recentEvents()->get();

Clients

Under construction, please check back soon

Plugins

Under construction, please check back soon