gregoriohc / laravel-trello

A Laravel wrapper and facade package for the Trello API
MIT License
34 stars 19 forks source link

Question : How to access client property ? #1

Open azorgh opened 8 years ago

azorgh commented 8 years ago

Hi guys,

I want to use Api\Card\Labels class from php-trello-api, but this class must be called with a client as first parameter.

But, nothing was up to get the client in your wrapper. Did you think it's a good idea ? Create a getter for the client in your wrapper ?

I need this because "classic call" doesn't work :

$card = Trello::manager()->getCard();
$card->setBoardId(Trello::getDefaultBoardId());
$card->setListId(Trello::getDefaultListId());
$card->setName('My card');
$card->setDescription('A description');
// $card->addLabel('green'); //-> $this->data['labels'] doesn't exists, a error was thrown
// $card->setLabels([['color' => 'green']]); //-> Dunno what kind of array is needed (taken from Card.php on line 728)
$card->save();

Maybe you have a idea ? Or I can fork and add a getClient function, but not so usefull if you don't need this !

Thanks !

h2asoft commented 7 years ago

Hi ,

I have the same problem here, did you have any luck resolving this issue?

Thanks