Closed delemore closed 6 years ago
Hi! I've just checked and it works. Are you using the latest library version?
I just updated to the latest Version, but still get this error message.
Here my complete script:
`<? require('vendor/autoload.php');
use seregazhuk\PinterestBot\Factories\PinterestBot;
$bot = PinterestBot::create();
// Login $bot->auth->login('', '');
$error = $bot->getLastError(); echo $error; if($error!='') { echo"$error
echo"Sections
$boardid='215258125878669038';
$sections = $bot->boardSections->forBoard($boardid);
echo"
"; print_r($sections); echo""; ?>`
Just to be sure that you have an updated version. Do you have file /mypath/vendor/seregazhuk/pinterest-bot/src/Api/Providers/BoardSections.php
?
Yes, i do habe this file in my directory.
I think that you have missed something. Check your code. I have created an empty project with the latest version and it works.
I even copied manually the complete "src" Folder here from github. I still get error.
Have you repeated the steps I've done in the gif above?
Yes, I repeated the steps shown in your gif.
Just now I did Change the filename "BoardSections.php" to "Boardsections.php" (no capital S) and I only get this error: bool(false)
Oh, I see. It was the filename issue 🤦♂️ sorry about that. I'll fix it tomorrow. I think false
is because in my example I didn't log in and used some random board id.
It Looks like? Inbetween I could solve the bool(false) error, I uncommented the Login-part of the script ;-) Right now I am testing some boards.
Btw: Thank you so much for your support!!
I confirm, the issue was the filename.
Thank you for help with finding the bug :wink: !
You're welcome. Glad to help you 👋
@delemore I've fixed the issue with filename BoardSection
. Please update to version 5.7.2
and it will work as expected :wink: 👍
Hi
Running:
$sections = $bot->boardSections->forBoard($boardId);
returns this error: _Fatal error: Uncaught seregazhuk\PinterestBot\Exceptions\WrongProvider: Provider seregazhuk\PinterestBot\Api\Providers\Boardsections not found. in /mypath/vendor/seregazhuk/pinterest-bot/src/Api/ProvidersContainer.php:191 Stack trace: #0 /mypath/vendor/seregazhuk/pinterest-bot/src/Api/ProvidersContainer.php(119): seregazhuk\PinterestBot\Api\ProvidersContainer->resolveProviderClass('boardsections') #1 /mypath/vendor/seregazhuk/pinterest-bot/src/Api/ProvidersContainer.php(104): seregazhuk\PinterestBot\Api\ProvidersContainer->addProvider('boardsections') #2 /mypath/vendor/seregazhuk/pinterest-bot/src/Api/ProvidersContainer.php(82): seregazhuk\PinterestBot\Api\ProvidersContainer->getProvider('boardsections') #3 /mypath/test_section.php(30): seregazhuk\PinterestBot\Api\ProvidersContainer->_get('boardSections') #4 {main} thrown in /mypath/vendor/seregazhuk/pinterest-bot/src/Api/ProvidersContainer.php on line 191
Could you please have a look at this?