Methods summary
public
|
#
__construct( string $accessKey, string $baseUrl = 'http://localhost:7070', float $timeout = 0, float $connectTimeout = 5 )
Parameters
- $accessKey
string Access Key
- $baseUrl
string Base URL to the Event Server. Default is localhost:7070.
- $timeout
float Timeout of the request in seconds. Use 0 to wait indefinitely Default is 0.
- $connectTimeout
float Number of seconds to wait while trying to connect to a server. Default is 5.
Overrides
|
public
string
|
#
setUser( integer|string $uid, array $properties = array(), string $eventTime = null )
Set a user entity
Parameters
- $uid
integer|string User Id
- $properties
array Properties of the user entity to set
- $eventTime
string Time of the event in ISO 8601 format (e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
Returns
string JSON response
Throws
|
public
string
|
#
unsetUser( integer|string $uid, array $properties, string $eventTime = null )
Unset a user entity
Parameters
- $uid
integer|string User Id
- $properties
array Properties of the user entity to unset
- $eventTime
string Time of the event in ISO 8601 format (e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
Returns
string JSON response
Throws
|
public
string
|
#
deleteUser( integer|string $uid, string $eventTime = null )
Delete a user entity
Parameters
- $uid
integer|string User Id
- $eventTime
string Time of the event in ISO 8601 format (e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
Returns
string JSON response
Throws
|
public
string
|
#
setItem( integer|string $iid, array $properties = array(), string $eventTime = null )
Set an item entity
Parameters
- $iid
integer|string Item Id
- $properties
array Properties of the item entity to set
- $eventTime
string Time of the event in ISO 8601 format (e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
Returns
string JSON response
Throws
|
public
string
|
#
unsetItem( integer|string $iid, array $properties, string $eventTime = null )
Unset an item entity
Parameters
- $iid
integer|string Item Id
- $properties
array Properties of the item entity to unset
- $eventTime
string Time of the event in ISO 8601 format (e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
Returns
string JSON response
Throws
|
public
string
|
#
deleteItem( integer|string $iid, string $eventTime = null )
Delete an item entity
Parameters
- $iid
integer|string Item Id
- $eventTime
string Time of the event in ISO 8601 format (e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
Returns
string JSON response
Throws
|
public
string
|
#
recordUserActionOnItem( string $event, integer|string $uid, integer|string $iid, array $properties = array(), string $eventTime = null )
Record a user action on an item
Record a user action on an item
Parameters
- $event
string Event name
- $uid
integer|string User Id
- $iid
integer|string Item Id
- $properties
array Properties of the event
- $eventTime
string Time of the event in ISO 8601 format (e.g. 2014-09-09T16:17:42.937-08:00).
Default is the current time.
Returns
string JSON response
Throws
|
public
string
|
#
createEvent( array $data )
Create an event
Parameters
- $data
array An array describing the event
Returns
string JSON response
Throws
|
public
string
|
#
getEvent( string $eventId )
Retrieve an event
Parameters
Returns
string JSON response
Throws
|