\EventsForce\ResourcesAttendees

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

Summary

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

Properties

$event

$event : integer

Event id which we'll be looking in

Type

integer

$endpoint_prefix

$endpoint_prefix : string

Stores the endpoint prefix prior to all requests

Type

string

$client

$client : \EventsForce\Client

Stores an instance of the client for resources to Access

Type

\EventsForce\Client

Methods

setEvent()

setEvent(boolean  $event_id = false) : $this

Method to set the current event we're looking up in for attendees

Parameters

boolean $event_id

Throws

\EventsForce\Exceptions\InvalidArgumentException

Returns

$this

getEventId()

getEventId() : integer

Getter for event id

Throws

\EventsForce\Exceptions\Exception

Returns

integer

__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(array  $query = array()) : \Psr\Http\Message\StreamInterface

Method to get all Attendees for an event Api Docs: http://docs.eventsforce.apiary.io/#reference/attendees/eventseventidattendeesjsonlastmodifiedafterpaymentstatuscategoryregistrationstatus/get

Parameters

array $query

Throws

\EventsForce\Exceptions\InvalidArgumentException

Returns

\Psr\Http\Message\StreamInterface

get()

get(boolean|integer  $attendee_id = false) : \Psr\Http\Message\StreamInterface

Method to get a single attendee for an event Api Docs: http://docs.eventsforce.apiary.io/#reference/attendees/eventseventidattendeespersonidjson/get

Parameters

boolean|integer $attendee_id

Throws

\EventsForce\Exceptions\EmptyResponseException

Returns

\Psr\Http\Message\StreamInterface

update()

update(boolean  $attendee_id = false, array  $data = array()) : \Psr\Http\Message\StreamInterface

Method to update an attendee with a passed in set of data Api docs: http://docs.eventsforce.apiary.io/#reference/attendees/eventseventidattendeespersonidjsonhttpmethodpatch/post NOTE: NEEDS TESTING WITH FULL ACCESS API

Parameters

boolean $attendee_id
array $data

Throws

\EventsForce\Exceptions\EmptyResponseException

Returns

\Psr\Http\Message\StreamInterface

auth()

auth(boolean  $user_id = false, boolean  $password = false) : \Psr\Http\Message\StreamInterface

Method to authenticate a user API Docs - http://docs.eventsforce.apiary.io/#reference/attendees/eventseventidattendeesauthenticatejson/post

Parameters

boolean $user_id
boolean $password

Throws

\EventsForce\Resources\Exception
\EventsForce\Exceptions\InvalidArgumentException

Returns

\Psr\Http\Message\StreamInterface