Properties

$apiUrl

$apiUrl : string

Type

string — URL of API endpoint.

$debug

$debug : boolean

Type

boolean — Debug switch true for verbose.

$client

$client : \Guzzle\Http\ClientInterface

Type

\Guzzle\Http\ClientInterface — Guzzle HTTP Client

Methods

__construct()

__construct(\Guzzle\Http\ClientInterface  $client, array  $configuration = array()) 

Constructor.

Parameters

\Guzzle\Http\ClientInterface $client

Guzzle HTTP Client.

array $configuration

__call()

__call(  $name,   $arguments) 

For now also just allow direct access to guzzle itself.

Parameters

$name
$arguments

setCache()

setCache(\Radar\Connect\Cache  $cache) 

Set a cache to store entities.

Parameters

\Radar\Connect\Cache $cache

retrieveEntity()

retrieveEntity(\Radar\Connect\Entity\Entity  $entity) : \Radar\Connect\Entity\Entity

Retrieve all fields for single entity.

Entities can be partly loaded. Especially when just a reference on an event or group. Use this to retrieve the full entity. If there is a cache set, and the entity is still validly cached this will be returned rather than making a new query.

Parameters

\Radar\Connect\Entity\Entity $entity

The partly loaded entity.

Returns

\Radar\Connect\Entity\Entity

The loaded entity.

retrieveEntityMultiple()

retrieveEntityMultiple(array<mixed,\Radar\Connect\Entity\Entity>  $entities) : array<mixed,\Radar\Connect\Entity\Entity>

Retrieve all fields for multiple entities.

As retrieveEntity(), but making multiple concurrent requests.

Parameters

array<mixed,\Radar\Connect\Entity\Entity> $entities

Array of partly loaded entities.

Returns

array<mixed,\Radar\Connect\Entity\Entity> —

Array of loaded entities.

putEntity()

putEntity(\Radar\Connect\Entity\Entity  $entity) 

TODO Insert or update an existing Entity.

Parameters

\Radar\Connect\Entity\Entity $entity

prepareEventsRequest()

prepareEventsRequest(\Radar\Connect\Filter  $filter, array  $fields = array(), integer  $limit = 500) : \Guzzle\Http\Message\Request

Prepare a request to retrieve events.

Parameters

\Radar\Connect\Filter $filter
array $fields

A list of fields to load. Optional, default is most available fields.

integer $limit

How many events to return.

Returns

\Guzzle\Http\Message\Request —

Request object to retrieve.

prepareGroupsRequest()

prepareGroupsRequest(\Radar\Connect\Filter  $filter, array  $fields = array(), integer  $limit = 500) : \Guzzle\Http\Message\Request

Prepare a request to retrieve groups.

Parameters

\Radar\Connect\Filter $filter
array $fields

A list of fields to load. Optional, default is most available fields.

integer $limit

How many groups to return.

Returns

\Guzzle\Http\Message\Request —

Request object to retrieve.

retrieve()

retrieve(\Guzzle\Http\Message\RequestInterface  $request) : array<mixed,\Radar\Connect\Entity\Entity>

Retrieve entities from a prepared request.

Parameters

\Guzzle\Http\Message\RequestInterface $request

Returns

array<mixed,\Radar\Connect\Entity\Entity>

retrieveMultiple()

retrieveMultiple(array<mixed,\Guzzle\Http\Message\RequestInterface>  $requests) : array<mixed,\Radar\Connect\Entity\Entity>

Retrieve entities from multiple prepared requests.

Results are merged into one entity array.

Parameters

array<mixed,\Guzzle\Http\Message\RequestInterface> $requests

Returns

array<mixed,\Radar\Connect\Entity\Entity>

parseResponse()

parseResponse(\Guzzle\Http\Message\Response  $response) 

Parse a response from the client.

TODO this doesn't need to be in here.

Parameters

\Guzzle\Http\Message\Response $response