JGoogleDataPlusActivities
Extends \JGoogleDataGoogle+ data class for the Joomla Platform.
since |
3.1.4 |
---|---|
deprecated |
4.0 Use the |
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry $options = null, \JGoogleAuth $auth = null)
since |
3.1.4 |
---|
Arguments
- $options
\Joomla\Registry\Registry
Google options object.- $auth
\JGoogleAuth
Google data http client object.
authenticate
Method to authenticate to Google
authenticate() : boolean
since |
3.1.4 |
---|
Response
boolean
True on success.
getActivity
Get an activity.
getActivity(string $id, string $fields = null, string $alt = null) : mixed
since |
3.1.4 |
---|
Arguments
- $id
string
The ID of the activity to get.- $fields
string
Used to specify the fields you want returned.- $alt
string
Specifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default)
Response
mixed
Data from Google
getOption
Get an option from the JGoogleData instance.
getOption(string $key) : mixed
since |
3.1.4 |
---|
Arguments
- $key
string
The name of the option to get.
Response
mixed
The option value.
isAuthenticated
Check authentication
isAuthenticated() : boolean
since |
3.1.4 |
---|
Response
boolean
True 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 |
3.1.4 |
---|
Arguments
- $userId
string
The ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user.- $collection
string
The collection of activities to list. Acceptable values are: "public".- $fields
string
Used to specify the fields you want returned.- $max
integer
The maximum number of people to include in the response, used for paging.- $token
string
The 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
string
Specifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default)
Response
mixed
Data from Google
listGetData
Method to retrieve a list of data
listGetData(array $url, integer $maxpages = 1, string $token = null) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $url
array
URL to GET- $maxpages
integer
Maximum number of pages to return- $token
string
Next page token
Response
mixed
Data from Google
query
Method to retrieve data from Google
query(string $url, mixed $data = null, array $headers = null, string $method = 'get') : mixed
since |
3.1.4 |
---|
Arguments
- $url
string
The URL for the request.- $data
mixed
The data to include in the request.- $headers
array
The headers to send with the request.- $method
string
The type of http request to send.
Response
mixed
Data from Google.
safeXml
Method to validate XML
safeXml(string $data) : \SimpleXMLElement
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $data
string
XML data to be parsed
Response
\SimpleXMLElement
XMLElement of parsed data
search
Search all public activities.
search(string $query, string $fields = null, string $language = null, integer $max = 10, string $order = null, string $token = null) : mixed
since |
3.1.4 |
---|
Arguments
- $query
string
Full-text search query string.- $fields
string
Used to specify the fields you want returned.- $language
string
Specify the preferred language to search with. https://developers.google.com/+/api/search#available-languages- $max
integer
The maximum number of people to include in the response, used for paging.- $order
string
Specifies how to order search results. Acceptable values are "best" and "recent".- $token
string
The 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.
Response
mixed
Data from Google
setOption
Set an option for the JGoogleData instance.
setOption(string $key, mixed $value) : \JGoogleData
since |
3.1.4 |
---|
Arguments
- $key
string
The name of the option to set.- $value
mixed
The option value to set.
Response
\JGoogleData
This object for method chaining.