Skip to content

Latest commit

 

History

History
188 lines (141 loc) · 4.29 KB

README.md

File metadata and controls

188 lines (141 loc) · 4.29 KB

Venkman Build Status Coverage Status Code Climate Dependency Status

Retreive, parse, process, filter and assign emails from a Gmail account to a user, available for access through an API. A User has many Messages which are received from a Gmail account using the Gmailish Gem. This application was build using Agile, Minimum Viable Product and Test Driven Development principles.

Usage

Create a User

# Route
POST v1/registrations

# Required Parameters
[email, password, password_confirmation]

# Body
email=chuckjhardy%40venkman-app.com&password=ABC123789&password_confirmation=ABC123789

# Status
201 Created

# Response
{
	"user": {
		"authentication_token": "DkrZ8BzppQAVpC59pGHj",
		"user_id": 1
	}
}

Get a User

# Route
GET v1/users/:id

# Required Parameters
[auth_token]

# Query Parameter
auth_token: eKgSzpK3KC4pSkhxYybG

# Status
200 OK

# Response
{
	"user": {
		"authentication_token": "DkrZ8BzppQAVpC59pGHj",
		"email": "chuckjhardy@venkman-app.com",
		"id": 1
	}
}

Delete a User

# Route
DELETE v1/users/:id

# Required Parameters
[auth_token]

# Body
auth_token=TqCjxhL3MMMj7g7GV8NV

# Status
204 No Content

# Response
{}

Sign-in a User

# Route
POST v1/sessions

# Required Parameters
[email, password]

# Body
email=chuckjhardy%40venkman-app.com&password=ABC123789

# Status
201 Created

# Response
{
	"user": {
		"authentication_token": "DkrZ8BzppQAVpC59pGHj",
		"user_id": 1
	}
}

Sign-out a User

# Route
DELETE v1/sessions

# Required Parameters
[auth_token]

# Query Parameter
auth_token: eKgSzpK3KC4pSkhxYybG

# Status
204 No Content

# Response
''

Get Messages

# Route
GET v1/users/:user_id/messages

# Required Parameters
[auth_token]

# Query Parameter
auth_token: eKgSzpK3KC4pSkhxYybG

# Status
200 OK

# Response
[
  {
    "message": {
      "body": "Lorem Ipsum is simply dummy text of the printing and typesetting.",
      "created_at": "2013-03-31T12:27:48Z",
      "id": 1,
      "subject": "Through the Looking Glass",
      "updated_at": "2013-03-31T12:27:48Z",
      "user_id": 1
    }
  }
]

Get a Messages

# Route
GET v1/users/:user_id/messages/:id

# Required Parameters
[auth_token]

# Query Parameter
auth_token: eKgSzpK3KC4pSkhxYybG

# Status
200 OK

# Response
{
  "message": {
    "body": "Lorem Ipsum is simply dummy text of the printing and typesetting.",
    "created_at": "2013-03-31T12:27:48Z",
    "id": 1,
    "subject": "Through the Looking Glass",
    "updated_at": "2013-03-31T12:27:48Z",
    "user_id": 1
  }
}

Delete a Messages

# Route
DELETE v1/users/:user_id/messages/:id

# Required Parameters
[auth_token]

# Query Parameter
auth_token: eKgSzpK3KC4pSkhxYybG

# Status
204 No Content

# Response
{}

Contributing Maintained Status

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request