Larabros\Elogram\Repositories\UsersRepository::getMedia PHP Method

getMedia() public method

Get the most recent media published by a user.
public getMedia ( string $id = 'self', integer | null $count = null, integer | null $minId = null, integer | null $maxId = null ) : Response
$id string The ID of the user. Default is ``self``
$count integer | null Count of media to return
$minId integer | null Return media later than this min_id
$maxId integer | null Return media earlier than this max_id
return Larabros\Elogram\Http\Response
    public function getMedia($id = 'self', $count = null, $minId = null, $maxId = null)
    {
        $params = ['query' => ['count' => $count, 'min_id' => $minId, 'max_id' => $maxId]];
        return $this->client->request('GET', "users/{$id}/media/recent", $params);
    }