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.
- Create a User
- Get a User
- Delete a User
- Sign-in a User
- Sign-out a User
- Get Messages
- Get a Message
- Delete a Message
# 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
}
}
# 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
}
}
# Route
DELETE v1/users/:id
# Required Parameters
[auth_token]
# Body
auth_token=TqCjxhL3MMMj7g7GV8NV
# Status
204 No Content
# Response
{}
# 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
}
}
# Route
DELETE v1/sessions
# Required Parameters
[auth_token]
# Query Parameter
auth_token: eKgSzpK3KC4pSkhxYybG
# Status
204 No Content
# Response
''
# 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
}
}
]
# 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
}
}
# Route
DELETE v1/users/:user_id/messages/:id
# Required Parameters
[auth_token]
# Query Parameter
auth_token: eKgSzpK3KC4pSkhxYybG
# Status
204 No Content
# Response
{}
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request