Ruby adapter for LaMetric clocks
Add to your Gemfile:
gem 'la_metric'
Or execute:
gem install la_metric
Configure url and access token if you want to push data to your widget:
LaMetric.configure do |config|
config.url = 'your_app_push_url'
config.access_token = 'your_access_token'
end
Or via environment variables:
LA_METRIC_URL=your_app_push_url
LA_METRIC_ACCESS_TOKEN=your_access_token
Add your frames:
frames = LaMetric::Frames.new
frames.push('Some text')
frames.push(text: 9999, icon: 'i34', index: 0)
Push frames to widget:
LaMetric.push(frames)
Or render frames in your controller
render json: frames.to_json
Feel free :)
Ilia Kasianenko @got2be