1. Go to this page and download the library: Download kaankilic/pinbot library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
foreach ($bot->boards->pins($boardId) as $pin) {
// ...
}
foreach($bot->boards->followers($boardId) as $follower) {
// ...
}
// Send board with message
$bot->boards->sendWithMessage($boardId, 'Message', $userId); // To a user
$bot->boards->sendWithMessage($boardId, 'Message', [$userId1, $userId2]); // To many yusers
// Send board by email
$bot->boards->sendWithEmail($boardId, 'Message', '[email protected]'); // One email
$bot->boards->sendWithEmail($boardId, 'Message', ['[email protected]', '[email protected]']); // many
$invites = $bot->boards->invites();
// to a user by email
$bot->boards->sendInvite($boardId, '[email protected]');
// to a user by user id
$bot->boards->sendInvite($boardId, $userId);
// to users by email
$bot->boards->sendInvite($boardId, ['[email protected]', '[email protected]']);
// to users by user id
$bot->boards->sendInvite($boardId, [$user1Id, $user2Id]);
$bot->boards->acceptInvite($boardId);
$bot->boards->ignoreInvite($boardId);
$bot->boards->deleteInvite($boardId, $userId);
// also you can ban a user specifying third argument as true
$bot->boards->deleteInvite($boardId, $userId, true);
$result = $bot->comments->create($pinId, 'your comment');
// Result contains info about written comment. For example,
// comment_id if you want to delete it.
$bot->comments->delete($pinId, $commentId);
foreach ($bot->pins->fromSource('flickr.com') as $pin) {
// ...
}
foreach ($bot->pins->feed() as $pin) {
// ...
}
// Only first 20 pins from feed
foreach ($bot->pins->feed(20) as $pin) {
// ...
}
foreach ($bot->pins->activity($pinId) as $data) {
// ...
}
// Send pin with message
$bot->pins->sendWithMessage($pinId, 'message', $userId); // To a user
$bot->pins->sendWithMessage($pinId, 'message', [$userId1, $userId2]); // To many users
// Send pin by email
$bot->pins->sendWithEmail($pinId, 'message', '[email protected]'); // One email
$bot->pins->sendWithEmail($pinId, 'message', ['[email protected]', '[email protected]']); // Many
foreach ($bot->pinners->following('username') as $following) {
// ...
}
foreach ($bot->pinners->following('username', 'people') as $user) {
// Loop through people
}
foreach($bot->pinners->following('username', 'boards') as $board) {
// Loop through boards
}
foreach($bot->pinners->following('username', 'interests') as $interest) {
// Loop through interests
}
foreach ($bot->pinners->followingPeople('username') as $user) {
// Loop through people
}
foreach ($bot->pinners->followingBoards('username') as $board) {
// Loop through boards
}
foreach($bot->pinners->followingInterests('username') as $interest) {
// Loop through interests
}
foreach ($bot->pinners->followers('username') as $follower) {
// ...
}
// returns my followers
foreach($bot->pinners->followers() as $follower)
{
// ...
}
foreach ($bot->pinners->pins('username') as $pin) {
// ...
}
foreach ($bot->pinners->pins('username', 20) as $pin) {
// ...
}
foreach ($bot->pinners->likes('username') as $like) {
// ...
}
// By name
$bot->pinners->block('username');
// By id. For example, after calling info() method
$pinnerInfo = $bot->pinners->info('username');
$bot->pinners->block($pinnerInfo['id']);
$pins = $bot->pins->search('query')->toArray();
print_r($pins);
// Or iterate with requests
foreach ($bot->pins->search('query') as $pin) {
// ...
}
// Search only in my pins
$pins = $bot->pins->searchInMyPins('query')->toArray();
// Search in people
foreach($bot->pinners->search('query') as $pinner) {
// ...
}
// Search in boards
foreach($bot->boards->search('query') as $board) {
// ...
}
// Get result as array
$news = $bot->inbox->news()->toArray();
// Iterate with requests
foreach ($bot->inbox->news() as $new) {
// ...
}
// Get result as array
$notifications = $bot->inbox->notifications()->toArray();
// Iterate with requests
foreach ($bot->inbox->notifications() as $notification) {
// ...
}