This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Advanced
Oskar Dillén edited this page May 7, 2014
·
1 revision
Trello.Advanced
It has four methods, Get
, Post
, Put
and Delete
. They all accept a uri and an object with additional arguments. The return type is either dynamic
or a type of your choosing.
This is how you could make that request:
dynamic myList = trello.Advanced.Get("/lists/1234567890abcdefghijklmn",
new { cards = "all" });
Console.WriteLine(myList.name);
foreach (var card in myList.cards)
Console.WriteLine(card.name);
You can also create your own type if you don't want to deal with dynamic:
public class MyList
{
public string Name { get; set; }
public IEnumerable<MyCard> Cards { get; set; }
}
public class MyCard
{
public string Name { get; set; }
}
MyList myList = trello.Advanced.Get<MyList>("/lists/1234567890abcdefghijklmn",
new { cards = "all" });
Console.WriteLine(myList.Name);
foreach (var card in myList.Cards)
Console.WriteLine(card.Name);
The trello api is documented here: https://trello.com/docs/index.html.