Skip to content

Commit

Permalink
postInfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
ionutmarchis committed Nov 23, 2015
1 parent efbae0a commit 3f528f2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/Tumblr/API/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,28 @@ private function getRequest($path, $options, $addApiKey)
return $this->parseResponse($response);
}

/**
* Make a GET request to the given endpoint and return the response
*
* @param $blogName
* @param $postId
* @param bool $addApiKey whether or not to add the api key
*
* @internal param string $path the path to call on
* @internal param array $options the options to call with
* @return array the response object (parsed)
*/
public function getPostInfo($blogName, $postId, $addApiKey)
{
$options = [
'id'=> $postId,
'notes_info'=>true,
'reblog_info'=>true
];
$path = $this->blogPath($blogName, '/posts');
return $this->getRequest($path, $options, $addApiKey);
}

/**
* Make a POST request to the given endpoint and return the response
*
Expand Down

0 comments on commit 3f528f2

Please sign in to comment.