mmck328 / brunt_api.rb

An unofficial Ruby binding for Brunt API (e.g. Blind Engine)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BruntAPI

Gem Version

This is an unofficial Ruby binding for Brunt API. Ported from JS binding by MattJeanes.

Currently this gem support operations only for Brunt Blind Engine.

Installation

gem 'brunt_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install brunt_api

Usage

Preparation

client = BruntAPI::Client.new
client.login('brunt_account_id', 'password')

Get things infomation

client.get_things

Get thing state

client.get_state('thing_uri')

'thing_uri' can be obtained by BruntAPI::Client#get_things.

Set blind position via Blind Engine

client.set_position('thing_uri', position)

position must be Numeric in range 0-100.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mmck328/brunt_api.rb.

License

The gem is available as open source under the terms of the MIT License.

About

An unofficial Ruby binding for Brunt API (e.g. Blind Engine)

License:MIT License


Languages

Language:Ruby 97.7%Language:Shell 2.3%