Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Latest commit

 

History

History
127 lines (97 loc) · 2.54 KB

pinners.md

File metadata and controls

127 lines (97 loc) · 2.54 KB

Pinners

Follow/unfollow users

Follow/unfollow user. You can use both id or username. Notice: When using username, bot will make one additional request to resolve user'id for his name:

$bot->pinners->follow($userId);
$bot->pinners->unfollow($userId);
// or
$bot->pinners->follow($username);
$bot->pinners->unfollow($username);

User info

Get user info by username:

$userData = $bot->pinners->info($username);

Following boards/pinners/interests

People

Get people the user follows. Returns Pagination object:

foreach ($bot->pinners->followingPeople('username') as $user) {
    // Loop through people
}

Method behaves like https://pinterest.com/following page: includes recent pins for these pinners.

Boards

Get boards the user follows. Returns Pagination object:

foreach ($bot->pinners->followingBoards('username') as $user) {
    // Loop through boards
}

Interests

Get interests the user follows. Returns Pagination object:

foreach ($bot->pinners->followingInterests('username') as $user) {
    // Loop through interests
}

User followers

Get user followers (returns Pagination object). Accepts optional parameter username, whose subscribers need to receive.

foreach ($bot->pinners->followers('username') as $follower) {
    // ...
}

Without arguments returns current users' followers:

// returns my followers
foreach($bot->pinners->followers() as $follower)
{
	// ...
}

Check if you follow a certain user:

if ($bot->pinners->isFollowedByMe('username)) {
    // ...
}

User pins

Get the newest pins of a pinner (returns Pagination object):

foreach ($bot->pinners->pins('username') as $pin) {
    // ...
}

Get the last 20 pins of a pinner:

foreach ($bot->pinners->pins('username', 20) as $pin) {
    // ...
}

Liked pins

Get pins that user likes (returns Pagination object):

foreach ($bot->pinners->likes('username') as $like) {
    // ...
}

Block a user

Block a user:

// By name
$bot->pinners->block('username');

// By id. For example, after calling info() method
$pinnerInfo = $bot->pinners->info('username');
$bot->pinners->block($pinnerInfo['id']);