Project

reco4life

0.0
No commit activity in last 3 years
No release in over 3 years
Reco4life提供HTTP API来管理智能插座,封装这些接口
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 2.1.0
~> 10.0
 Project Readme

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

License

MIT License.