コード例 #1
0
 /**
  * Returns tumblr blog method
  *
  * @param *string 
  * @param *string 
  * @param *string 
  * @param *string 
  * @return Eden_Tumblr_User
  */
 public function user($consumerKey, $consumerSecret, $accessToken, $accessSecret)
 {
     //argument test
     Eden_Tumblr_Error::i()->argument(1, 'string')->argument(2, 'string')->argument(3, 'string')->argument(4, 'string');
     //Argument 4 must be a string
     return Eden_Tumblr_User::i($consumerKey, $consumerSecret, $accessToken, $accessSecret);
 }
コード例 #2
0
ファイル: base.php プロジェクト: annaqin/eden
 /**
  * Returns the meta of the last call
  *
  * @return array
  */
 public function getMeta($key = NULL)
 {
     Eden_Tumblr_Error::i()->argument(1, 'string', 'null');
     if (isset($this->_meta[$key])) {
         return $this->_meta[$key];
     }
     return $this->_meta;
 }
コード例 #3
0
ファイル: oauth.php プロジェクト: annaqin/eden
 /**
  * Returns the URL used for login. 
  * 
  * @param string the request key
  * @param string
  * @return string
  */
 public function getLoginUrl($token, $redirect)
 {
     //Argument tests
     Eden_Tumblr_Error::i()->argument(1, 'string')->argument(2, 'string');
     //Argument 2 must be a string
     //build the query
     $query = array('oauth_token' => $token, 'oauth_callback' => $redirect);
     $query = http_build_query($query);
     return self::AUTHORIZE_URL . '?' . $query;
 }
コード例 #4
0
ファイル: user.php プロジェクト: annaqin/eden
 /**
  * The type of post to return. Specify one of the following:  
  * text, photo, quote, link, chat, audio, video, answer
  *
  * @param string
  * @return this
  */
 public function setType($type)
 {
     //Argument 1 must be a string
     Eden_Tumblr_Error::i()->argument(1, 'string');
     $this->_query['type'] = $type;
     return $this;
 }
コード例 #5
0
ファイル: blog.php プロジェクト: brynner/postr
 /**
  * Delete Post
  *
  * @param string The ID of the post to delete
  * @param string The standard or custom blog hostname
  * @return this
  */
 public function delete($baseHostName, $postId)
 {
     //Argument test
     Eden_Tumblr_Error::i()->argument(1, 'string')->argument(2, 'string');
     //Argument 2 must be a string
     $this->_query['id'] = $postId;
     return $this->_post(sprintf(self::URL_BLOG_DELETE_POST, $baseHostName), $this->_query);
 }
コード例 #6
0
 /**
  * Delete Post
  *
  * @param string The ID of the post to delete
  * @param string The standard or custom blog hostname
  * @return this
  */
 public function delete($baseHostName, $postId)
 {
     //Argument test
     Eden_Tumblr_Error::i()->argument(1, 'string')->argument(2, 'string');
     //Argument 2 must be a string
     //populate fields
     $query = array('id' => $postId);
     return $this->_post(sprintf(self::URL_BLOG_DELETE_POST, $baseHostName), $query);
 }
コード例 #7
0
 /**
  * Unlike a post 
  *
  * @param integer
  * @param string
  * @return array
  */
 public function unlike($id, $reblog)
 {
     //Argument Test
     Eden_Tumblr_Error::i()->argument(1, 'integer')->argument(2, 'string');
     //Argument 2 must be a string
     $query = array('url' => $url, 'reblog_key' => $reblog);
     $url = sprintf(self::URL_UNLIKE, $url);
     return $this->_post($url, $query);
 }
コード例 #8
0
ファイル: eden.php プロジェクト: jpalala/startupjobs
 public function setType($type)
 {
     Eden_Tumblr_Error::i()->argument(1, 'string');
     $this->_type = $type;
     return $this;
 }