Skip to content

Instantly share code, notes, and snippets.

@btompkins
Created February 11, 2013 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btompkins/4756963 to your computer and use it in GitHub Desktop.
Save btompkins/4756963 to your computer and use it in GitHub Desktop.
Ducksboard Dashboard API
var dashboardClient = new DashboardClient("** Your API Key Here **");
var dashboard = new Dashboard()
{
Name = dashboardName,
Background = "dark wood",
};
dashboard = dashboardClient.Create(dashboard);
var leaderboard = client.Create(new Widget()
{
WidgetProperties = new WidgetProperties()
{
Dashboard = dashboard.Slug,
Kind = "custom_textual_status_leaderboard",
Sound = true,
Title = "My Leaderboard",
Width = 1,
Height = 2
},
Slots = new Slot
{
Slot1 = new SlotData
{
Subtitle1 = "Thing",
Color1 = Color.DarkSlateBlue.ToDucksboardColor(),
Subtitle2 = "Status",
Color2 = Color.Black.ToDucksboardColor()
}
}
});
leaderboard.Slots.Slot1.Label = "MySlotLabel";
dashboardCient.Update(leaderboard, leaderboard.Slug);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment