Skip to content

Instantly share code, notes, and snippets.

@gr2m
Last active August 29, 2016 09:01
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save gr2m/5465679 to your computer and use it in GitHub Desktop.
Save gr2m/5465679 to your computer and use it in GitHub Desktop.
Imagine you could control other devices with a simple JavaScript API, right from your browser.
// Ask the coffee machine at IP 192.168.2.2 to do its job
device('192.168.2.2')
.do( 'coffee' )
.then( wakeMeUpCallback )
// turn all lights on
device.findAll('light').do('turnOn')
@EvanHahn
Copy link

Typo police: "to do it's job" should be "to do its job".

@gr2m
Copy link
Author

gr2m commented May 15, 2013

@EvanHahn fixed, cheers!

@jpillora

this is awesome! I want an API for all the things in my house! Let's make some dream code for that, would make a cool example

@brandondrew
Copy link

More typo police: "it's connected devices" should be "its connected devices".

"it's connected devices" == "it is connected devices"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment