Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question : How to access client property ? #1

Open
azorgh opened this issue Jun 2, 2016 · 1 comment
Open

Question : How to access client property ? #1

azorgh opened this issue Jun 2, 2016 · 1 comment

Comments

@azorgh
Copy link

azorgh commented Jun 2, 2016

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
Copy link

h2asoft commented Mar 7, 2017

Hi ,

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

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants