Ducksboard API Ruby wrapper
Configuration
API Key can be set in the environment
export DUCKSBOARD_API_KEY='YOURKEY'
or in an initializer
Ducksboard.api_key = 'YOURKEY'
Box
= Ducksboard::Box.new(1234) # Widget numeric id
.value = 10
.save
Counter
= Ducksboard::Counter.new(1234)
.value = 10
.save
Image
= Ducksboard::Image.new(1235)
.source = "https://dashboard.ducksboard.com/static/accounts/img/logo_small.png"
# or
.source = "~/Pictures/logo.png"
. = "Ducksboard logo!"
. = 1310649204
.save
Gauge
= Ducksboard::Graph.new(1235)
.value = 0.93
.save
Graph
# remember that the graph widgets need atleast 2 points before it displays anything
= Ducksboard::Graph.new(1236)
. = Time.now.to_i
.value = 198
.save
Pin
= Ducksboard::Pin.new(1234)
.value = 10
.save
Timeline
= Ducksboard::Timeline.new(1237)
.title = "A Title"
.image = "http://url.to.io/some_image.gif"
# or
.image = :edited
# any of the following as a string or symbol: orange, red, green, created, edited or deleted
.content = "text content"
.link = "http://google.com"