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

how to create new card #52

Open
mojtabatz opened this issue Aug 5, 2017 · 1 comment
Open

how to create new card #52

mojtabatz opened this issue Aug 5, 2017 · 1 comment

Comments

@mojtabatz
Copy link

how can i create new card under defined list in the existing board?

@mojtabatz mojtabatz changed the title create new card how to create new card Aug 5, 2017
@steinbrueckri
Copy link

Hi @mojtabatz,
thats a small example ...

require __DIR__ . '/vendor/autoload.php';
use Trello\Client;
use Trello\Manager;

$api_key = "xxx";
$token = "xxx";

$client = new Client();
$client->authenticate($api_key, $token, Client::AUTH_URL_CLIENT_ID);

$manager = new Manager($client);
$card = $manager->getCard();

$card
    ->setName('Test card')
    // Go to you board in browser add ".json" at the end of the URL and search for the ID of the list you wont...
    ->setListId('5a4e2ab9ed0724e270f109d8')
    ->setDescription('Test description')
    ->save();```

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