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

Latest commit

 

History

History
101 lines (69 loc) · 2.09 KB

interests-and-topics.md

File metadata and controls

101 lines (69 loc) · 2.09 KB

Interests and Topics

Interests

Main interests list

Get a list of main categories. Required bot to be logged in:

$categories = $bot->interests->main();

Category info

Get category info by name (can be taken from main()):

$info = $bot->interests->info("gifts"); 
// gifts - can be any other string. Actualy it is a key field from one of the results returned by main() method.

Related topics

Get related topics for interest:

$topics = $bot->interests->getRelatedTopics('videos');

Interest pins

Get pins for specific interest (returns Pagination object):

foreach ($bot->interests->pins('videos') as $pin) {
    // ...
}

Topics

Each interest has a list of related topics.

Follow/unfollow topic

Follow/unfollow a topic by name:

$bot->topics->follow('content-marketing');
$bot->topics->unFollow('content-marketing');

Topic info

Get a topic info:

$info = $bot->topics->info('content-marketing');

Topic pins

Get pins for a specific topic (returns Pagination object):

foreach ($bot->topics->pins('content-marketing') as $pin) {
    // ...
}

Related topics for topic

Get related topics for topic (similar as related topics for interest):

$topics = $bot->topics->getRelatedTopics('content-marketing');

Trending topics

Get trending topics from http://pinterest.com/discover page. Then you can use an id of each topic to get trending pins for this topic with $bot->pins->explore() method:

$trendingTopics = $bot->topics->explore();
$firstTopicId = $trendingTopics[0]['id'];

$pins = $bot->pins->explore($firstTopicId)->toArray();