\EventsForce\ResourcesEvents

Class for handling the events resource on the Events Force API: http://docs.eventsforce.apiary.io/#reference/events

Summary

Methods
Properties
Constants
__construct()
genEndpoint()
argsMerge()
getAll()
get()
No public properties found
No constants found
No protected methods found
$client
$endpoint_prefix
N/A
No private methods found
No private properties found
N/A

Properties

$client

$client : \EventsForce\Client

Stores an instance of the client for resources to Access

Type

\EventsForce\Client

$endpoint_prefix

$endpoint_prefix : string

Stores the endpoint prefix prior to all requests

Type

string

Methods

__construct()

__construct(\EventsForce\Client  $client) 

BaseResource constructor.

Parameters

\EventsForce\Client $client

genEndpoint()

genEndpoint(  $suffix = '') : string

Method to generate the endpoint Accepts either string or array e.g string 2/attendees.json or array [2, 'attendees.json'] both return events/2/attendees.json when the endpoint_prefix is events

Parameters

$suffix

Returns

string

argsMerge()

argsMerge(  $args = null,   $defaults = null) : array

method to merge array of arguments with defaults

Parameters

$args
  • passed in arguments
$defaults
  • default argument array to merge with

Returns

array

getAll()

getAll() : \Psr\Http\Message\StreamInterface

Method to get all events Api Docs: http://docs.eventsforce.apiary.io/#reference/events/eventsjson/get

Throws

\EventsForce\Exceptions\Exception

Returns

\Psr\Http\Message\StreamInterface

get()

get(boolean  $id = false) : \Psr\Http\Message\StreamInterface

Method to get single event http://docs.eventsforce.apiary.io/#reference/events/eventseventidjson/get

Parameters

boolean $id

Throws

\EventsForce\Exceptions\EmptyResponseException
\EventsForce\Exceptions\InvalidArgumentException

Returns

\Psr\Http\Message\StreamInterface