2017 © Pedro Peláez
 

library riftconnector

Establishes connection to the RIFT chatserver API

image

ecn/riftconnector

Establishes connection to the RIFT chatserver API

  • Tuesday, September 1, 2015
  • by elbcoast
  • Repository
  • 0 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

ECNRiftConnector

Build Status, (*1)

Installation

Install the RiftConnector via composer:, (*2)

$ composer require ecn/riftconnector:0.1.*

Usage

The RiftConnector comes along with a RiftService class that allows easy access to shards, zones and events., (*3)

Setup

To get a running RiftService instance, pass a connector instance to the constructor:, (*4)

<?php

use GuzzleHttp\Client;
use Ecn\RiftConnector\Connector;
use Ecn\RiftConnector\RiftService;

$connector = new Connector(new Client(), Connector::EU_SERVER);
$service = new RiftService($connector);

Retrieving shard data

To retrieve a shard object, use the getShard() method:, (*5)


// returns a Shard object $shard = $service->getShard('Brutwacht');

Retrieving zones

You can query zones from the shard object:, (*6)


// returns an array of Zone objects $zones = $shard->getZones();

Alternatively, you can retrieve zones directly from the RiftService:, (*7)


// returns an array of Zone objects $zones = $service->getZones('Brutwacht');

Retrieving events

Similar to zones, events can be retrieved from the shard object or from the RiftConnector directly:, (*8)


// returns an array of Event objects $events = $shard->getEvents(); // returns an array of Event objects $events = $service->getEvents('Brutwacht');

Additionally, you can check a zone directly for an event:, (*9)


$zones = $shard->getZones(); if ($zones[0]->hasEvent()) { $event = $zones[0]->getEvent(); }

The Versions

01/09 2015

dev-master

9999999-dev

Establishes connection to the RIFT chatserver API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pierre Groth

01/09 2015

v0.1.1

0.1.1.0

Establishes connection to the RIFT chatserver API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pierre Groth

01/09 2015

v0.1.0

0.1.0.0

Establishes connection to the RIFT chatserver API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pierre Groth