JGoogleDataAdsense
Extends \JGoogleDataGoogle Adsense 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.
generateReport
Method to retrieve a list of AdSense Channel URLs
generateReport(string $accountID, mixed $start, mixed $end = false, array $options = array(), integer $maxpages = 1) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account- $start
mixed
Start day- $end
mixed
End day- $options
array
Search settings- $maxpages
integer
Maximum number of pages of accounts to return
Response
mixed
Data from Google
getAccount
Method to get an Adsense account's settings from Google
getAccount(string $accountID, boolean $subaccounts = true) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account to get- $subaccounts
boolean
Include list of subaccounts
Response
mixed
Data from Google
getChannel
Method to get an Adsense Channel
getChannel(string $accountID, string $adclientID, string $channelID) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account to get- $adclientID
string
ID of client to get- $channelID
string
ID of channel to get
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.
getUnit
Method to get an AdSense AdUnit
getUnit(string $accountID, string $adclientID, string $adunitID) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account to get- $adclientID
string
ID of client to get- $adunitID
string
ID of adunit to get
Response
mixed
Data from Google
isAuthenticated
Check authentication
isAuthenticated() : boolean
since |
3.1.4 |
---|
Response
boolean
True if authenticated.
listAccounts
Method to retrieve a list of AdSense accounts from Google
listAccounts(array $options = array(), integer $maxpages = 1) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $options
array
Search settings- $maxpages
integer
Maximum number of pages of accounts to return
Response
mixed
Data from Google
listChannels
Method to retrieve a list of AdSense Custom Channels
listChannels(string $accountID, string $adclientID, array $options = array(), integer $maxpages = 1) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account- $adclientID
string
ID of client to list channels from- $options
array
Search settings- $maxpages
integer
Maximum number of pages of accounts to return
Response
mixed
Data from Google
listChannelUnits
Method to retrieve a list of AdSense Adunits for a specific Custom Channel
listChannelUnits(string $accountID, string $adclientID, string $channelID, array $options = array(), integer $maxpages = 1) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account- $adclientID
string
ID of client- $channelID
string
ID of channel to list units from- $options
array
Search settings- $maxpages
integer
Maximum number of pages of accounts to return
Response
mixed
Data from Google
listClients
Method to retrieve a list of AdSense clients from Google
listClients(string $accountID, array $options = array(), integer $maxpages = 1) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account to list the clients from- $options
array
Search settings- $maxpages
integer
Maximum number of pages of accounts to return
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
listUnitChannels
Method to retrieve a list of AdSense Custom Channels for a specific Adunit
listUnitChannels(string $accountID, string $adclientID, string $adunitID, array $options = array(), integer $maxpages = 1) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account- $adclientID
string
ID of client- $adunitID
string
ID of adunit to list channels from- $options
array
Search settings- $maxpages
integer
Maximum number of pages of accounts to return
Response
mixed
Data from Google
listUrlChannels
Method to generate a report from Google AdSense
listUrlChannels(string $accountID, string $adclientID, array $options = array(), integer $maxpages = 1) : mixed
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $accountID
string
ID of account- $adclientID
string
ID of client- $options
array
Search settings- $maxpages
integer
Maximum number of pages of accounts to return
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
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.