PHP Class seregazhuk\PinterestBot\Api\Providers\Boards

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

Protected Properties

Property Type Description
$deleteUrl
$entityIdName
$followUrl
$followersFor
$followersUrl
$loginRequiredFor array
$searchScope
$unFollowUrl

Public Methods

Method Description
create ( string $name, string $description, string $privacy = self::BOARD_PRIVACY_PUBLIC ) : boolean Create a new board.
createPrivate ( string $name, string $description ) : boolean Create a new board.
forUser ( string $username ) : array | boolean Get boards for user by username.
getPinsFromBoard ( integer $boardId, array $bookmarks = [] ) : seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse
info ( string $username, string $board ) : array | boolean Get info about user's board.
pins ( integer $boardId, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination Get pins from board by boardId.
send ( integer $boardId, string $text, array | string $userIds, array | string $emails ) : boolean Send board with message or by email.
sendWithEmail ( integer $boardId, string $text, array | string $emails ) : boolean Send board with emails.
sendWithMessage ( integer $boardId, string $text, array | string $userIds ) : boolean Send board with messages.
titleSuggestionsFor ( string $pinId ) : array | boolean Returns title suggestions for pin.
update ( $boardId, $attributes ) : mixed Update board info. Gets boardId and an associative array as params. Available keys of the array are: 'category', 'description', 'privacy'.

Method Details

create() public method

Create a new board.
public create ( string $name, string $description, string $privacy = self::BOARD_PRIVACY_PUBLIC ) : boolean
$name string
$description string
$privacy string Can be 'public' or 'secret'. 'public' by default.
return boolean

createPrivate() public method

Create a new board.
public createPrivate ( string $name, string $description ) : boolean
$name string
$description string
return boolean

forUser() public method

Get boards for user by username.
public forUser ( string $username ) : array | boolean
$username string
return array | boolean

getPinsFromBoard() public method

public getPinsFromBoard ( integer $boardId, array $bookmarks = [] ) : seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse
$boardId integer
$bookmarks array
return seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse

info() public method

Get info about user's board.
public info ( string $username, string $board ) : array | boolean
$username string
$board string
return array | boolean

pins() public method

Get pins from board by boardId.
public pins ( integer $boardId, integer $limit = Pagination::DEFAULT_LIMIT ) : Pagination
$boardId integer
$limit integer
return seregazhuk\PinterestBot\Helpers\Pagination

send() public method

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

sendWithEmail() public method

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

sendWithMessage() public method

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

titleSuggestionsFor() public method

Returns title suggestions for pin.
public titleSuggestionsFor ( string $pinId ) : array | boolean
$pinId string
return array | boolean

update() public method

- 'privacy' can be 'public' or 'secret'. 'public' by default. - 'category' is 'other' by default.
public update ( $boardId, $attributes ) : mixed
$boardId
$attributes
return mixed

Property Details

$deleteUrl protected_oe property

protected $deleteUrl

$entityIdName protected_oe property

protected $entityIdName

$followUrl protected_oe property

protected $followUrl

$followersFor protected_oe property

protected $followersFor

$followersUrl protected_oe property

protected $followersUrl

$loginRequiredFor protected_oe property

protected array $loginRequiredFor
return array

$searchScope protected_oe property

protected $searchScope

$unFollowUrl protected_oe property

protected $unFollowUrl