| 1 | <?php |
||
| 11 | class Topics extends EntityProvider |
||
| 12 | { |
||
| 13 | use Followable, HasRelatedTopics; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $loginRequiredFor = [ |
||
| 19 | 'follow', |
||
| 20 | 'unFollow', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | protected $followUrl = UrlBuilder::RESOURCE_FOLLOW_INTEREST; |
||
| 24 | protected $unFollowUrl = UrlBuilder::RESOURCE_UNFOLLOW_INTEREST; |
||
| 25 | |||
| 26 | protected $entityIdName = 'interest_id'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get category info |
||
| 30 | * |
||
| 31 | * @param string $topic |
||
| 32 | * @return array|bool |
||
| 33 | */ |
||
| 34 | public function info($topic) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Returns a feed of pins. |
||
| 41 | * |
||
| 42 | * @param string $interest |
||
| 43 | * @param int $limit |
||
| 44 | * @return Pagination |
||
| 45 | */ |
||
| 46 | public function pins($interest, $limit = Pagination::DEFAULT_LIMIT) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Returns an array of trending topics from http://pinterest.com/discover page. Then |
||
| 58 | * you can use an id of each topic to get trending pins for this topic with |
||
| 59 | * $bot->pins->explore() method. |
||
| 60 | * |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | public function explore() |
||
| 72 | } |