- Follow/unfollow
- User info
- Following boards/pinners/interests
- User followers
- User pins
- Liked pins
- Block a user
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);
Get user info by username:
$userData = $bot->pinners->info($username);
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.
Get boards the user follows. Returns Pagination object:
foreach ($bot->pinners->followingBoards('username') as $user) {
// Loop through boards
}
Get interests the user follows. Returns Pagination object:
foreach ($bot->pinners->followingInterests('username') as $user) {
// Loop through interests
}
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)) {
// ...
}
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) {
// ...
}
Get pins that user likes (returns Pagination object):
foreach ($bot->pinners->likes('username') as $like) {
// ...
}
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']);