Skip to content

Commit

Permalink
Implement getUserFeed
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Jul 9, 2015
1 parent 2fbfcfa commit b941d6d
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,34 @@ public function getUser($id = 'self')
return $this->request('users/' . $id);
}

public function getUserFeed($limit = null)
/**
* See the authenticated user's feed.
*
* @link https://instagram.com/developer/endpoints/users/#get_users_feed
*
* @param integer|null $limit
* @param integer|null $minId
* @param integer|null $maxId
* @return bool|object
* @throws \Exception
*/
public function getUserFeed($limit = null, $minId = null, $maxId = null)
{
$parameters = [];
if (!is_null($limit)) {
$this->checkLimit($limit);
$parameters['count'] = $limit;
}

if ($minId) {
$parameters['min_id'] = $minId;
}

if ($maxId) {
$parameters['min_id'] = $maxId;
}

return $this->request('users/self/feed');
}

public function getUserMedia($id = 'self', $limit = null)
Expand Down

0 comments on commit b941d6d

Please sign in to comment.