function __construct($cache = true) { parent::__construct("bigtree-internal-google-analytics-api", "Google Analytics API", "org.bigtreecms.api.analytics.google", $cache); $this->Settings["key"] = $this->ClientID; $this->Settings["secret"] = $this->ClientSecret; $this->ReturnURL = "urn:ietf:wg:oauth:2.0:oob"; }
function __construct($cache = true) { parent::__construct("bigtree-internal-facebook-api", "Facebook API", "org.bigtreecms.api.facebook", $cache); // Set OAuth Return URL $this->ReturnURL = ADMIN_ROOT . "developer/services/facebook/return/"; // Set access scope $this->Scope = $this->Settings["scope"]; }
function __construct($cache = true) { parent::__construct("bigtree-internal-instagram-api", "Instagram API", "org.bigtreecms.api.instagram", $cache); // Set OAuth Return URL $this->ReturnURL = ADMIN_ROOT . "developer/services/instagram/return/"; // Just send the request with the secret. $this->RequestParameters = array(); $this->RequestParameters["access_token"] =& $this->Settings["token"]; }
function __construct($cache = true) { parent::__construct("bigtree-internal-googleplus-api", "Google+ API", "org.bigtreecms.api.googleplus", $cache); // Set OAuth Return URL $this->ReturnURL = ADMIN_ROOT . "developer/services/googleplus/return/"; // Just send the request with the secret. $this->RequestParameters = array(); $this->RequestParameters["access_token"] =& $this->Settings["token"]; $this->RequestParameters["api_key"] =& $this->Settings["key"]; $this->RequestParameters["api_secret"] =& $this->Settings["secret"]; }
function __construct($service = false) { parent::__construct("bigtree-internal-cloud-storage", "Cloud Storage", "org.bigtreecms.api.cloud-storage", false); $this->Service = $service ? $service : $this->Settings["service"]; // Set OAuth Return URL for Google Cloud Storage $this->ReturnURL = ADMIN_ROOT . "developer/cloud-storage/google/return/"; // Retrieve a fresh token for Rackspace Cloud Files if ($this->Service == "rackspace") { if (!isset($this->Settings["rackspace"]["token_expiration"]) || $this->Settings["rackspace"]["token_expiration"] < time()) { $this->_getRackspaceToken(); } $this->RackspaceAPIEndpoint = $this->Settings["rackspace"]["endpoints"][$this->Settings["rackspace"]["region"]]; $this->RackspaceCDNEndpoint = $this->Settings["rackspace"]["cdn_endpoints"][$this->Settings["rackspace"]["region"]]; } }
function __construct($cache = true) { parent::__construct("bigtree-internal-salesforce-api", "Salesforce API", "org.bigtreecms.api.salesforce", $cache); // Set OAuth Return URL $this->ReturnURL = ADMIN_ROOT . "developer/services/salesforce/return/"; // Change things if we're in the test environment. if ($this->Settings["test_environment"]) { $this->AuthorizeURL = str_ireplace("login.", "test.", $this->AuthorizeURL); $this->TokenURL = str_replace("login.", "test.", $this->TokenURL); } // Get a new access token for this session. $this->Connected = false; if ($this->Settings["refresh_token"]) { $response = json_decode(BigTree::cURL($this->TokenURL, array("grant_type" => "refresh_token", "client_id" => $this->Settings["key"], "client_secret" => $this->Settings["secret"], "refresh_token" => $this->Settings["refresh_token"])), true); if ($response["access_token"]) { $this->InstanceURL = $response["instance_url"]; $this->EndpointURL = $this->InstanceURL . "/services/data/v28.0/"; $this->Settings["token"] = $response["access_token"]; $this->Connected = true; } } }
function __construct($cache = true) { parent::__construct("bigtree-internal-flickr-api", "YouTube API", "org.bigtreecms.api.flickr", $cache); // Set OAuth Return URL $this->ReturnURL = ADMIN_ROOT . "developer/services/flickr/return/"; }
function __construct($cache = true) { parent::__construct("bigtree-internal-yahoo-boss-api", "Yahoo BOSS API", "org.bigtreecms.api.yahooboss", $cache); // Set OAuth Return URL $this->ReturnURL = ADMIN_ROOT . "developer/geocoding/yahoo-boss/return/"; }
function __construct($cache = true) { parent::__construct("bigtree-internal-twitter-api", "Twitter API", "org.bigtreecms.api.twitter", $cache); // Set OAuth Return URL $this->ReturnURL = ADMIN_ROOT . "developer/services/twitter/return/"; }