PHP Class seregazhuk\PinterestBot\Api\Providers\Provider

Inheritance: use trait seregazhuk\PinterestBot\Helpers\Providers\ProviderHelper
Mostrar archivo Open project: seregazhuk/php-pinterest-bot Class Usage Examples

Protected Properties

Property Type Description
$loginRequiredFor array List of methods that require logged status.
$request seregazhuk\PinterestBot\Api\Request Instance of the API Request.
$response seregazhuk\PinterestBot\Api\Response

Public Methods

Method Description
__construct ( Request $request, Response $response )
checkMethodRequiresLogin ( string $method ) : boolean
getEntityIdName ( ) : string
getPaginatedData ( array $data, string $url, array $bookmarks = [] ) : Response Executes pagination GET request.
isLoggedIn ( ) : boolean

Protected Methods

Method Description
execGetRequest ( array $requestOptions = [], string $resourceUrl = '' ) : array | boolean Executes a GET request to Pinterest API.
execGetRequestWithPagination ( array $requestOptions, string $resourceUrl, array $bookmarks = [] ) : Response Executes a GET request to Pinterest API with pagination.
execPostRequest ( array $requestOptions, string $resourceUrl, boolean $returnResponse = false ) : Response | boolean Executes a POST request to Pinterest API.
execute ( $url, string $postString = "" )
processResult ( string $res ) : Response

Method Details

__construct() public method

public __construct ( Request $request, Response $response )
$request seregazhuk\PinterestBot\Api\Request
$response seregazhuk\PinterestBot\Api\Response

checkMethodRequiresLogin() public method

public checkMethodRequiresLogin ( string $method ) : boolean
$method string
return boolean

execGetRequest() protected method

Executes a GET request to Pinterest API.
protected execGetRequest ( array $requestOptions = [], string $resourceUrl = '' ) : array | boolean
$requestOptions array
$resourceUrl string
return array | boolean

execGetRequestWithPagination() protected method

Executes a GET request to Pinterest API with pagination.
protected execGetRequestWithPagination ( array $requestOptions, string $resourceUrl, array $bookmarks = [] ) : Response
$requestOptions array
$resourceUrl string
$bookmarks array
return seregazhuk\PinterestBot\Api\Response

execPostRequest() protected method

Executes a POST request to Pinterest API.
protected execPostRequest ( array $requestOptions, string $resourceUrl, boolean $returnResponse = false ) : Response | boolean
$requestOptions array
$resourceUrl string
$returnResponse boolean
return seregazhuk\PinterestBot\Api\Response | boolean

execute() protected method

protected execute ( $url, string $postString = "" )
$url
$postString string

getEntityIdName() public method

public getEntityIdName ( ) : string
return string

getPaginatedData() public method

Executes pagination GET request.
public getPaginatedData ( array $data, string $url, array $bookmarks = [] ) : Response
$data array
$url string
$bookmarks array
return seregazhuk\PinterestBot\Api\Response

isLoggedIn() public method

public isLoggedIn ( ) : boolean
return boolean

processResult() protected method

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

Property Details

$loginRequiredFor protected_oe property

List of methods that require logged status.
protected array $loginRequiredFor
return array

$request protected_oe property

Instance of the API Request.
protected Request,seregazhuk\PinterestBot\Api $request
return seregazhuk\PinterestBot\Api\Request

$response protected_oe property

protected Response,seregazhuk\PinterestBot\Api $response
return seregazhuk\PinterestBot\Api\Response