PHP Class seregazhuk\PinterestBot\Helpers\UrlBuilder

Show file Open project: seregazhuk/php-pinterest-bot Class Usage Examples

Public Methods

Method Description
buildApiUrl ( string $resourceUrl ) : string Appends resource url to base pinterest url.
buildRequestString ( array $request ) : mixed
fixEncoding ( string $str ) : string Fix URL-encoding for some characters.
getFollowingUrlByType ( string $type ) : string | null
getSearchUrl ( array $bookmarks = [] ) : string Return Pinterest API url for search requests.

Method Details

buildApiUrl() public static method

Appends resource url to base pinterest url.
public static buildApiUrl ( string $resourceUrl ) : string
$resourceUrl string
return string

buildRequestString() public static method

public static buildRequestString ( array $request ) : mixed
$request array
return mixed

fixEncoding() public static method

Fix URL-encoding for some characters.
public static fixEncoding ( string $str ) : string
$str string
return string

getFollowingUrlByType() public static method

public static getFollowingUrlByType ( string $type ) : string | null
$type string
return string | null

getSearchUrl() public static method

Return Pinterest API url for search requests.
public static getSearchUrl ( array $bookmarks = [] ) : string
$bookmarks array
return string