From 1316763bac19074980d7899e31f5cba1b7abd4ec Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Mon, 12 Jan 2015 08:54:48 -0800 Subject: [PATCH] README updates for API extraction --- README.markdown | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 4e1d389..041e909 100644 --- a/README.markdown +++ b/README.markdown @@ -126,6 +126,12 @@ Cylon.robot({ ### Multiple Spheros + API Server +To use the API server, first install the plugin: + + $ npm install cylon-api-http + +Then it can be used in Cylon scripts: + ```javascript var Cylon = require('cylon'); @@ -267,9 +273,14 @@ For more info on browser support, and for help with different configurations, yo ## API -Cylon has a built-in API that you can interact with your robots. +Cylon's HTTP API plugin can be used to interact with your robots remotely. -All you need to start up the API server is to place the following command in your `.js` file after you require Cylon. +To use it, install it alongside Cylon: + + $ npm install cylon-api-http + + +Then, all you need to do is call `Cylon#api` in your robot's script: ```javascript var Cylon = require("cylon"); @@ -277,6 +288,7 @@ Cylon.api(); ``` Then visit `https://localhost:3000/` and you are ready to control your robots from a web browser! + You can check out more information on the Cylon API in the docs [here](http://cylonjs.com/documentation/guides/api).