Activities

Extends \Joomla\Google\Data

Google+ data class for the Joomla Framework.

deprecated
since

1.0

deprecated

The joomla/google package is deprecated

Methods

__construct

Constructor.

__construct(array $options = array(), \Joomla\Google\Auth $auth = null) 
inherited
since

1.0

Arguments

$options

arrayGoogle options object.

$auth

\Joomla\Google\AuthGoogle data http client object.

authenticate

Method to authenticate to Google

authenticate() : boolean
inherited
since

1.0

Response

booleanTrue on success.

getActivity

Get an activity.

getActivity(string $id, string $fields = null, string $alt = null) : mixed
since

1.0

Arguments

$id

stringThe ID of the activity to get.

$fields

stringUsed to specify the fields you want returned.

$alt

stringSpecifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default)

Response

mixedData from Google

getOption

Get an option from the Data instance.

getOption(string $key) : mixed
inherited
since

1.0

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

isAuthenticated

Check authentication

isAuthenticated() : boolean
inherited
since

1.0

Response

booleanTrue if authenticated.

listActivities

List all of the activities in the specified collection for a particular user.

listActivities(string $userId, string $collection, string $fields = null, integer $max = 10, string $token = null, string $alt = null) : mixed
since

1.0

Arguments

$userId

stringThe ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user.

$collection

stringThe collection of activities to list. Acceptable values are: "public".

$fields

stringUsed to specify the fields you want returned.

$max

integerThe maximum number of people to include in the response, used for paging.

$token

stringThe continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. This token may be of any length.

$alt

stringSpecifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default)

Response

mixedData from Google

listGetData

Method to retrieve a list of data

listGetData(array $url, integer $maxpages = 1, string $token = null) : mixed
inherited
since

1.0

throws

\UnexpectedValueException

Arguments

$url

arrayURL to GET

$maxpages

integerMaximum number of pages to return

$token

stringNext page token

Response

mixedData from Google

query

Method to retrieve data from Google

query(string $url, mixed $data = null, array $headers = null, string $method = 'get') : mixed
inherited
since

1.0

Arguments

$url

stringThe URL for the request.

$data

mixedThe data to include in the request.

$headers

arrayThe headers to send with the request.

$method

stringThe type of http request to send.

Response

mixedData from Google.

safeXml

Method to validate XML

safeXml(string $data) : \SimpleXMLElement
inherited static
since

1.0

throws

\UnexpectedValueException

Arguments

$data

stringXML data to be parsed

Response

\SimpleXMLElementXMLElement of parsed data

setOption

Set an option for the Data instance.

setOption(string $key, mixed $value) : \Joomla\Google\Data
inherited
since

1.0

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\Joomla\Google\DataThis object for method chaining.

Properties

options

Options for the Google data object.

inherited
since

1.0

Type(s)

array

auth

Authentication client for the Google data object.

inherited
since

1.0

Type(s)

\Joomla\Google\Auth