Ejemplo n.º 1
0
 /**
  * \param $domain_name the domain name of the site
  * \param $access_token a valid access token
  */
 function __construct($domain_name, $access_token = null)
 {
     parent::__construct($domain_name, 'user', 'users');
     // Set the access token and /me method if provided
     if ($access_token !== null) {
         $this->url->SetCategory('me')->SetAccessToken($access_token)->SetCacheTTL(0);
     }
 }
Ejemplo n.º 2
0
 /**
  * \param $url the domain name of the site
  * \param $access_token a valid access token
  */
 function __construct($url, $access_token)
 {
     // Pass this information along to the parent constructor
     parent::__construct($url, 'event', 'events');
     // This data should not be cached (future work needs
     // to be done to correct this limitation)
     $this->url->SetAccessToken($access_token)->DisableCache();
 }
Ejemplo n.º 3
0
 /**
  * \param $url the domain name of the site or a URL object
  * \param $access_token a valid access token
  */
 function __construct($url, $access_token = null)
 {
     // Pass this information along to the parent constructor
     parent::__construct($url, 'inbox_item', null, 'inbox');
     // Disable the cache for this request if we have an access token
     if ($access_token !== null) {
         $this->url->SetAccessToken($access_token)->SetCacheTTL(0);
     }
 }
Ejemplo n.º 4
0
 /**
  * \param $url the domain name of the site or a URL object
  * \param $return_object the type of data expected to be returned
  * \param $category the category of requests being made
  * \param $method the method being called
  */
 function __construct($url, $return_object = null, $category = null, $method = null)
 {
     // Assume some defaults
     if ($category === null) {
         $category = 'posts';
     }
     // Pass this information along to the parent constructor
     parent::__construct($url, $return_object === null ? 'post' : $return_object, $method === null ? $category : null, $method);
 }
Ejemplo n.º 5
0
 /**
  * \param $url the domain name of the site or a URL object
  * \param $method the method being called
  */
 function __construct($url, $method = null)
 {
     // Pass this information along to the parent constructor
     parent::__construct($url, 'badge', $method === null ? 'badges' : null, $method);
 }
Ejemplo n.º 6
0
 /**
  * \param $url the domain name of the site or a URL object
  */
 function __construct($url)
 {
     // Pass this information along to the parent constructor
     parent::__construct($url, 'tag', null, 'tags');
 }
Ejemplo n.º 7
0
 /**
  * \param $url the domain name of the site or a URL object
  * \param $method the method being called
  */
 function __construct($url, $method = null)
 {
     // Pass this information along to the parent constructor
     parent::__construct($url, 'suggested_edit', $method === null ? 'suggested-edits' : null, $method !== null ? $method : null);
 }
Ejemplo n.º 8
0
 /**
  * \param $url a URL object
  */
 function __construct($url)
 {
     // Pass this information along to the parent constructor
     parent::__construct($url, 'tag_synonym');
     $this->url->SetParameter('synonyms');
 }