eddiem3/live-chair — pull request #7 by eddiem3 (2014-10-29 03:16:32+00:00)
Title: Em user api

#Summary:
-I wrote code for the sessions api where an api user can create or destroy a session.
-I tested each controller function with RSPEC and all tests are green

#Usage
Given a user in the db with the credentials "user@example.com" and password "secret"

```
curl -v -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST http://localhost:3000/api/v1/session -d "{\"session\":{\"email\":\"user@example.com\",\"password\":\"secret\"}}"
```
##Should yield :
```
{"success":true,"info":"Logged in","data":{}}
```
```
curl -v -H 'Content-Type: application/json' -H 'Accept: application/json' -X DELETE http://localhost:3000/api/v1/session/
```
##Should yield:

```
{"success":true,"info":"Logged out","data":{}}
```

#Todos:
-make some form of auth token
-create a user from user api
-standardize JSON octets
-make tests more DRY
--make respone_json helper