You are here

public function GAFeed::__construct in Google Analytics Counter 7.2

Constructor for the GAFeed class

File

./GAFeed.lib.inc, line 62
Provides the GAFeed object type and associated methods.

Class

GAFeed
GAFeed class to authorize access to and request data from the Google Analytics Data Export API.

Code

public function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
  $this->signatureMethod = new OAuthSignatureMethod_HMAC_SHA1();
  $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);

  /* Allow developers the option of OAuth authentication without using this class's methods */
  if (!empty($oauth_token) && !empty($oauth_token_secret)) {
    $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
  }
}