PHP Class Larabros\Elogram\Repositories\UsersRepository

Inheritance: extends AbstractRepository
Mostra file Open project: larabros/elogram

Public Methods

Method Description
find ( string $username ) : Response | null Searches for and returns a single user's information. If no results are found, null is returned.
followedBy ( ) : Response Get the list of users this user is followed by.
follows ( ) : Response Get the list of users this user follows.
get ( string $id = 'self' ) : Response Get information about a user.
getLikedMedia ( integer | null $count = null, integer | null $maxLikeId = null ) : Response Get the list of recent media liked by the owner of the access token.
getMedia ( string $id = 'self', integer | null $count = null, integer | null $minId = null, integer | null $maxId = null ) : Response Get the most recent media published by a user.
getRelationship ( string $targetUserId ) : Response Get information about the relationship of the owner of the access token to another user.
requestedBy ( ) : Response List the users who have requested this user's permission to follow.
search ( string $query, integer | null $count = null ) : Response Get a list of users matching the query.
setRelationship ( string $targetUserId, string $action ) : Response Modify the relationship between the owner of the access token and the target user.

Method Details

find() public method

Searches for and returns a single user's information. If no results are found, null is returned.
public find ( string $username ) : Response | null
$username string A username to search for
return Larabros\Elogram\Http\Response | null

followedBy() public method

Get the list of users this user is followed by.
public followedBy ( ) : Response
return Larabros\Elogram\Http\Response

follows() public method

Get the list of users this user follows.
public follows ( ) : Response
return Larabros\Elogram\Http\Response

get() public method

Get information about a user.
public get ( string $id = 'self' ) : Response
$id string The ID of the user. Default is ``self``
return Larabros\Elogram\Http\Response

getLikedMedia() public method

Get the list of recent media liked by the owner of the access token.
public getLikedMedia ( integer | null $count = null, integer | null $maxLikeId = null ) : Response
$count integer | null Count of media to return
$maxLikeId integer | null Return media liked before this id
return Larabros\Elogram\Http\Response

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

getRelationship() public method

Get information about the relationship of the owner of the access token to another user.
public getRelationship ( string $targetUserId ) : Response
$targetUserId string The ID of the target user
return Larabros\Elogram\Http\Response

requestedBy() public method

List the users who have requested this user's permission to follow.
public requestedBy ( ) : Response
return Larabros\Elogram\Http\Response

setRelationship() public method

Modify the relationship between the owner of the access token and the target user.
public setRelationship ( string $targetUserId, string $action ) : Response
$targetUserId string The ID of the target user
$action string Can be one of: ``follow | unfollow | approve | ignore``
return Larabros\Elogram\Http\Response