Browse files

0.3.0

* client-side: restio.listen -> restio.connect
* moved documentation to docs folder
  • Loading branch information...
1 parent 2a69655 commit 4613d07ba600d69f81e117e4ae7b62edb6379523 @ramitos committed Dec 11, 2012
Showing with 13 additions and 9 deletions.
  1. +1 −1 component.json
  2. +6 −2 documentation.md → docs/intro.md
  3. +1 −1 package.json
  4. +3 −3 readme.md
  5. +1 −1 src/client/restio.js
  6. +1 −1 test/index.html
View
2 component.json
@@ -1,7 +1,7 @@
{
"name": "restio",
"license": "MIT",
- "version": "0.2.0",
+ "version": "0.3.0",
"twitter": "@ramitos",
"description": "REST-like syntax for WebSockets",
"main": "src/client/restio.js",
View
8 documentation.md → docs/intro.md
@@ -39,7 +39,7 @@ io.on('connection', function (socket) {
var assert = require('assert'),
restio = require('restio');
-restio.listen(document.location.origin, function (io) {
+restio.connect(document.location.origin, function (io) {
io.on.get('/status', function (req, res) {
assert(Object.keys(req.params).length == 0);
assert(Object.keys(req.query).length == 0);
@@ -52,4 +52,8 @@ restio.listen(document.location.origin, function (io) {
assert(user.id == 5);
});
});
-```
+```
+
+## api
+### [client](client.md)
+### [server](server.md)
View
2 package.json
@@ -1,7 +1,7 @@
{
"name": "restio",
"license": "MIT",
- "version": "0.2.0",
+ "version": "0.3.0",
"author": "Sérgio Ramos",
"description": "REST-like syntax for WebSockets",
"main": "src/server/restio.js",
View
6 readme.md
@@ -2,7 +2,7 @@
REST-like syntax for WebSockets built on top of [engine.io](https://github.com/LearnBoost/engine.io)
-([more](restio/blob/master/documentation.md))
+([more](restio/blob/master/docs/intro.md))
## install
@@ -49,7 +49,7 @@ io.on('connection', function (socket) {
var assert = require('assert'),
restio = require('restio');
-restio.listen(document.location.origin, function (io) {
+restio.connect(document.location.origin, function (io) {
io.on.get('/status', function (req, res) {
assert(Object.keys(req.params).length == 0);
assert(Object.keys(req.query).length == 0);
@@ -65,7 +65,7 @@ restio.listen(document.location.origin, function (io) {
```
## todo
- * support `chunked` data responses
+ * support streamed `req.body`
* api documentation
* test suite
View
2 src/client/restio.js
@@ -5,7 +5,7 @@ var methods = require('../methods'),
eio = require('engine.io'),
getOn = require('../on');
-module.exports.listen = function (addr, callback) {
+module.exports.connect = function (addr, callback) {
var socket = new eio.Socket(addr);
var callbacks = {};
var io = {on: {}};
View
2 test/index.html
@@ -9,7 +9,7 @@
var assert = require('component-assert'),
restio = require('restio');
- restio.listen(document.location.origin, function (io) {
+ restio.connect(document.location.origin, function (io) {
io.on.get('/status', function (req, res) {
assert(Object.keys(req.params).length == 0);
assert(Object.keys(req.query).length == 0);

0 comments on commit 4613d07

Please sign in to comment.