PHP Класс seregazhuk\PinterestBot\Api\Providers\Pins

Наследование: extends Provider, use trait seregazhuk\PinterestBot\Helpers\Providers\Traits\SearchTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$deleteUrl
$entityIdName
$loginRequiredFor array
$searchScope

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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.

Описание методов

activity() публичный Метод

Get the latest pin activity with pagination.
public activity ( string $pinId, integer $limit = Pagination::DEFAULT_LIMIT ) : Iterato\Iterator | array
$pinId string
$limit integer
Результат Iterato\Iterator | array

bulkEdit() защищенный Метод

protected bulkEdit ( string | array $pinIds, integer $boardId, string $editUrl ) : boolean
$pinIds string | array
$boardId integer
$editUrl string
Результат boolean

copy() публичный Метод

Copy pins to board
public copy ( array | string $pinIds, integer $boardId ) : boolean | Response
$pinIds array | string
$boardId integer
Результат boolean | seregazhuk\PinterestBot\Api\Response

create() публичный Метод

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
Результат array

deleteFromBoard() публичный Метод

Delete pins from board.
public deleteFromBoard ( string | array $pinIds, integer $boardId ) : boolean
$pinIds string | array
$boardId integer
Результат boolean

edit() публичный Метод

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
Результат boolean

feed() публичный Метод

Get pins from user's feed
public feed ( integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
$limit integer
Результат seregazhuk\PinterestBot\Helpers\Pagination

fromSource() публичный Метод

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
Результат seregazhuk\PinterestBot\Helpers\Pagination

getAggregatedPinId() защищенный Метод

protected getAggregatedPinId ( string $pinId ) : integer | null
$pinId string
Результат integer | null

getFeedRequestData() защищенный Метод

protected getFeedRequestData ( mixed $params = [] ) : array
$params mixed
Результат array

info() публичный Метод

Get information of a pin by PinID.
public info ( string $pinId ) : array | boolean
$pinId string
Результат array | boolean

like() публичный Метод

Likes pin with current ID.
public like ( string $pinId ) : boolean
$pinId string
Результат boolean

likePinMethodCall() защищенный Метод

Calls Pinterest API to like or unlike Pin by ID.
protected likePinMethodCall ( string $pinId, string $resourceUrl ) : boolean
$pinId string
$resourceUrl string
Результат boolean

move() публичный Метод

public move ( string | array $pinIds, integer $boardId ) : boolean | Response
$pinIds string | array
$boardId integer
Результат boolean | seregazhuk\PinterestBot\Api\Response

moveToBoard() публичный Метод

Moves pin to a new board
public moveToBoard ( integer $pindId, integer $boardId ) : boolean
$pindId integer
$boardId integer
Результат boolean

repin() публичный Метод

Make a repin.
public repin ( integer $repinId, integer $boardId, string $description = '' ) : array
$repinId integer
$boardId integer
$description string
Результат array

saveOriginalImage() публичный Метод

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
Результат false | string

send() публичный Метод

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
Результат boolean

sendWithEmail() публичный Метод

Send pin with emails.
public sendWithEmail ( integer $pinId, string $text, array | string $emails ) : boolean
$pinId integer
$text string
$emails array | string
Результат boolean

sendWithMessage() публичный Метод

Send pin with messages.
public sendWithMessage ( integer $pinId, string $text, array | string $userIds ) : boolean
$pinId integer
$text string
$userIds array | string
Результат boolean

unLike() публичный Метод

Removes your like from pin with current ID.
public unLike ( string $pinId ) : boolean
$pinId string
Результат boolean

visualSimilar() публичный Метод

public visualSimilar ( string $pinId, array $crop = [] ) : array | boolean
$pinId string
$crop array
Результат array | boolean

Описание свойств

$deleteUrl защищенное свойство

protected $deleteUrl

$entityIdName защищенное свойство

protected $entityIdName

$loginRequiredFor защищенное свойство

protected array $loginRequiredFor
Результат array

$searchScope защищенное свойство

protected $searchScope