2.0.0 • Published 9 years ago

bowline v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Bowline

An involuntary API for Supermechanical's Twine.

Installation

npm install bowline

Usage

KeyValue
emailYour email address for twine.cc.
passwordYour password for twine.cc.
deviceIdYour Twine's unique ID. You can find this in the URL of your Twine's "Rules" page – see this (hopefully) helpful diagram.
var Bowline = require('bowline');

var client = new Bowline({
  email: 'twine@example.net',
  password: 'sekret',
  deviceId: '00ff00ff00ff00ff'
});

client.fetch(function(err, response){
  // do something
});

Response Structure

{
  meta: {
    battery: 'weak',
    wifiSignal: 'full'
  },
  time: {
    age: 32.436,
    timestamp: 1418069760
  },
  values: {
    batteryVoltage: 2942324,
    firmwareVersion: '2.0.2'
    isVibrating: false,
    orientation: 'top'
    temperature: 68,
    updateMode: 'normal',
    vibration: 0
  }
}

Meta

KeySample ValueNotes
battery'1/3'Possible values: plugged in, full, 2/3, 1/3, weak, unknown
wifiSignal'full'Possible values: full, 2/3, 1/3, weak, unknown

Time

KeySample ValueNotes
age32.436Seconds since data updated
timestamp1418069760Unix timestamp of data update time

Values

KeySample ValueNotes
firmwareVersion'2.0.2'
temperature70in degress Fahrenheit
vibration0in milli-Gs
orientation'top'Possible values: top, bottom, left, right, front, back
isVibratingfalsePossible values: true, false
batteryVoltage2.68in volts
updateMode'normal'Possible values: normal, fast

Development

CommandDescription
make buildCompile from Coffeescript
make testCompile and run tests
2.0.0

9 years ago

1.0.0

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago