Created
February 11, 2013 19:39
-
-
Save btompkins/4756963 to your computer and use it in GitHub Desktop.
Ducksboard Dashboard API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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