seregazhuk / php-pinterest-bot

This PHP library will help you to work with your Pinterest account without using any API account credentials.
MIT License
413 stars 129 forks source link

Enhancement: Get Pins of Section #388

Open delemore opened 6 years ago

delemore commented 6 years ago

Hi, Could you please allow to retrieve the pins of a section?

The code should be like this:

foreach ($ bot-> boards-> pins ($boardId, $sectionId) as $ pin) { // ... }

I ran the above code. It does not return an error, but I get the pins of the board, not the pins of the section.

seregazhuk commented 6 years ago

Hi! Of course, the code above wouldn't work, it is not implemented to work like this. Right now I'm working on fixing bugs. Feel free to provide a pull request if you are interested in this feature :wink:

delemore commented 6 years ago

Hi, I will provide a pull request. And thank you for updating to Version 5.7.2 👍

seregazhuk commented 6 years ago

Api should be implemented in BoardSections provider

exiost commented 4 years ago

Hi seregazhuk... How to get $boardId?

sineld commented 4 years ago

Hi seregazhuk... How to get $boardId?

This will give you all the boards

$boards = $bot->boards->forMe();

and this will give you the first item.

$boards = $bot->boards->forMe();
$boards[0]['id'];

you may iterate through all boards with a simple foreach loop.