Reco4life
封装Reco4life开发者平台提供的API
Installation
Add this line to your application's Gemfile:
gem 'reco4life'
And then execute:
$ bundle
Or install it yourself as:
$ gem install reco4life
Usage
require 'reco4life'
begin
Reco4life.user_name = 'your_user_name'
Reco4life.api_key ='your_api_key'
Reco4life.devices.each do |sn|
Reco4life.turn_on(sn) if Reco4life.online?(sn)
puts Reco4life.powered_on? sn
end
rescue => e
puts e
end