PHP Trait seregazhuk\PinterestBot\Api\Traits\Followable

Inheritance: use trait HandlesRequest, use trait HasEntityIdName
Show file Open project: seregazhuk/php-pinterest-bot

Public Methods

Method Description
createFollowRequestQuery ( integer $entityId ) : string
follow ( $entityId ) : boolean Follow user by user_id.
followers ( string $for, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination Get followers.
getFollowData ( array $data, string $resourceUrl, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
unFollow ( $entityId ) : boolean UnFollow user by user_id.

Protected Methods

Method Description
followCall ( integer $entityId, string $resourceUrl ) : boolean Make api call for follow/unFollow a entity (user/board).
getFollowUrl ( ) : string
getFollowersFor ( ) : string
getFollowersUrl ( ) : string
getUnFollowUrl ( ) : string
processResult ( string $res ) : Response

Method Details

createFollowRequestQuery() public method

public createFollowRequestQuery ( integer $entityId ) : string
$entityId integer
return string

follow() public method

Follow user by user_id.
public follow ( $entityId ) : boolean
$entityId
return boolean

followCall() protected method

Make api call for follow/unFollow a entity (user/board).
protected followCall ( integer $entityId, string $resourceUrl ) : boolean
$entityId integer
$resourceUrl string
return boolean

followers() public method

Get followers.
public followers ( string $for, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
$for string
$limit integer
return seregazhuk\PinterestBot\Helpers\Pagination

getFollowData() public method

public getFollowData ( array $data, string $resourceUrl, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
$data array
$resourceUrl string
$limit integer
return seregazhuk\PinterestBot\Helpers\Pagination

getFollowUrl() protected method

protected getFollowUrl ( ) : string
return string

getFollowersFor() protected method

protected getFollowersFor ( ) : string
return string

getFollowersUrl() protected method

protected getFollowersUrl ( ) : string
return string

getUnFollowUrl() protected method

protected getUnFollowUrl ( ) : string
return string

processResult() abstract protected method

abstract protected processResult ( string $res ) : Response
$res string
return seregazhuk\PinterestBot\Api\Response

unFollow() public method

UnFollow user by user_id.
public unFollow ( $entityId ) : boolean
$entityId
return boolean