PHP Class seregazhuk\PinterestBot\Api\Providers\Pins

Inheritance: extends Provider, use trait seregazhuk\PinterestBot\Helpers\Providers\Traits\SearchTrait
Exibir arquivo Open project: seregazhuk/php-pinterest-bot Class Usage Examples

Protected Properties

Property Type Description
$deleteUrl
$entityIdName
$loginRequiredFor array
$searchScope

Public Methods

Method Description
activity ( string $pinId, integer $limit = Pagination::DEFAULT_LIMIT ) : Iterato\Iterator | array Get the latest pin activity with pagination.
copy ( array | string $pinIds, integer $boardId ) : boolean | Response Copy pins to board
create ( string $imageUrl, integer $boardId, string $description = '', string $link = '' ) : array Create a pin. Returns created pin info.
deleteFromBoard ( string | array $pinIds, integer $boardId ) : boolean Delete pins from board.
edit ( integer $pindId, string $description = '', string $link = '', integer | null $boardId = null ) : boolean Edit pin by ID. You can move pin to a new board by setting this board id.
feed ( integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination Get pins from user's feed
fromSource ( string $source, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination Get pins from a specific url. For example: https://pinterest.com/source/flickr.com/ will return recent Pins from flickr.com
info ( string $pinId ) : array | boolean Get information of a pin by PinID.
like ( string $pinId ) : boolean Likes pin with current ID.
move ( string | array $pinIds, integer $boardId ) : boolean | Response
moveToBoard ( integer $pindId, integer $boardId ) : boolean Moves pin to a new board
related ( string $pinId, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
repin ( integer $repinId, integer $boardId, string $description = '' ) : array Make a repin.
saveOriginalImage ( integer $pinId, string $path ) : false | string Saves the pin original image to the specified path. On success returns full path to saved image. Otherwise returns false.
send ( string $pinId, string $text, array | string $userIds, array | string $emails ) : boolean Send pin with message or by email.
sendWithEmail ( integer $pinId, string $text, array | string $emails ) : boolean Send pin with emails.
sendWithMessage ( integer $pinId, string $text, array | string $userIds ) : boolean Send pin with messages.
unLike ( string $pinId ) : boolean Removes your like from pin with current ID.
visualSimilar ( string $pinId, array $crop = [] ) : array | boolean

Protected Methods

Method Description
bulkEdit ( string | array $pinIds, integer $boardId, string $editUrl ) : boolean
getAggregatedPinId ( string $pinId ) : integer | null
getFeedRequestData ( mixed $params = [] ) : array
likePinMethodCall ( string $pinId, string $resourceUrl ) : boolean Calls Pinterest API to like or unlike Pin by ID.

Method Details

activity() public method

Get the latest pin activity with pagination.
public activity ( string $pinId, integer $limit = Pagination::DEFAULT_LIMIT ) : Iterato\Iterator | array
$pinId string
$limit integer
return Iterato\Iterator | array

bulkEdit() protected method

protected bulkEdit ( string | array $pinIds, integer $boardId, string $editUrl ) : boolean
$pinIds string | array
$boardId integer
$editUrl string
return boolean

copy() public method

Copy pins to board
public copy ( array | string $pinIds, integer $boardId ) : boolean | Response
$pinIds array | string
$boardId integer
return boolean | seregazhuk\PinterestBot\Api\Response

create() public method

Create a pin. Returns created pin info.
public create ( string $imageUrl, integer $boardId, string $description = '', string $link = '' ) : array
$imageUrl string
$boardId integer
$description string
$link string
return array

deleteFromBoard() public method

Delete pins from board.
public deleteFromBoard ( string | array $pinIds, integer $boardId ) : boolean
$pinIds string | array
$boardId integer
return boolean

edit() public method

Edit pin by ID. You can move pin to a new board by setting this board id.
public edit ( integer $pindId, string $description = '', string $link = '', integer | null $boardId = null ) : boolean
$pindId integer
$description string
$link string
$boardId integer | null
return boolean

feed() public method

Get pins from user's feed
public feed ( integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
$limit integer
return seregazhuk\PinterestBot\Helpers\Pagination

fromSource() public method

Get pins from a specific url. For example: https://pinterest.com/source/flickr.com/ will return recent Pins from flickr.com
public fromSource ( string $source, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
$source string
$limit integer
return seregazhuk\PinterestBot\Helpers\Pagination

getAggregatedPinId() protected method

protected getAggregatedPinId ( string $pinId ) : integer | null
$pinId string
return integer | null

getFeedRequestData() protected method

protected getFeedRequestData ( mixed $params = [] ) : array
$params mixed
return array

info() public method

Get information of a pin by PinID.
public info ( string $pinId ) : array | boolean
$pinId string
return array | boolean

like() public method

Likes pin with current ID.
public like ( string $pinId ) : boolean
$pinId string
return boolean

likePinMethodCall() protected method

Calls Pinterest API to like or unlike Pin by ID.
protected likePinMethodCall ( string $pinId, string $resourceUrl ) : boolean
$pinId string
$resourceUrl string
return boolean

move() public method

public move ( string | array $pinIds, integer $boardId ) : boolean | Response
$pinIds string | array
$boardId integer
return boolean | seregazhuk\PinterestBot\Api\Response

moveToBoard() public method

Moves pin to a new board
public moveToBoard ( integer $pindId, integer $boardId ) : boolean
$pindId integer
$boardId integer
return boolean

repin() public method

Make a repin.
public repin ( integer $repinId, integer $boardId, string $description = '' ) : array
$repinId integer
$boardId integer
$description string
return array

saveOriginalImage() public method

Saves the pin original image to the specified path. On success returns full path to saved image. Otherwise returns false.
public saveOriginalImage ( integer $pinId, string $path ) : false | string
$pinId integer
$path string
return false | string

send() public method

Send pin with message or by email.
public send ( string $pinId, string $text, array | string $userIds, array | string $emails ) : boolean
$pinId string
$text string
$userIds array | string
$emails array | string
return boolean

sendWithEmail() public method

Send pin with emails.
public sendWithEmail ( integer $pinId, string $text, array | string $emails ) : boolean
$pinId integer
$text string
$emails array | string
return boolean

sendWithMessage() public method

Send pin with messages.
public sendWithMessage ( integer $pinId, string $text, array | string $userIds ) : boolean
$pinId integer
$text string
$userIds array | string
return boolean

unLike() public method

Removes your like from pin with current ID.
public unLike ( string $pinId ) : boolean
$pinId string
return boolean

visualSimilar() public method

public visualSimilar ( string $pinId, array $crop = [] ) : array | boolean
$pinId string
$crop array
return array | boolean

Property Details

$deleteUrl protected_oe property

protected $deleteUrl

$entityIdName protected_oe property

protected $entityIdName

$loginRequiredFor protected_oe property

protected array $loginRequiredFor
return array

$searchScope protected_oe property

protected $searchScope