EPICMAIL is an online system which enables you to exchange messages/information over the internet
You will need the following software running on your machine to get started
-
Python 3.6 - ( download python )
-
pip (download pip)
Flask (Python framework) -
Pytest (Python testing framework)
Pylint (Bug and quality checker for the Python programming language)
These are the steps on how to get the application running on your machine
-
In your terminal, cd to where you want to create your repository
-
Clone the project repo
$ git clone https://github.com/alexxsanya/EPIC-MAIL-API.git
- Install a virtual environment via pip
$ pip install virtualenv
- Create a virtual environment
$ virtualenv venv
- Activate the virtual environment
$ EPIC-MAIL-API/venv/scripts/activate
- Install project dependencies
$ pip install -r requirements.txt
- Run the app locally with the command
$ python app.py
- Run this command in the project directory.
pytest --cov=api
All APIs are prefixed with /api/v1
VERB | API | ACTION |
---|---|---|
POST | /auth/signup | Create User Account |
POST | /auth/login | Login user |
POST | /messages | Creates a Message |
GET | /messages | Get all received messages |
GET | /messages/unread | Get all unread messages |
GET | /messages/sent | Get all sent messages |
GET | /messages/ | Get specific message |
DELETE | /messages/ | Delete message |
{
"status" : 200,
"data" : { }
}
{
"status" : 404,
"error" : "relevant-error-message"
}
Response body:
{
"status" : "Integer",
"data" : [
{
"id" : "Integer",
"createdOn" : "DateTime",
"subject" : "String",
"message" : "String",
"senderId" : "Integer",
"receiverId" : "Integer",
"parentMessageId" : "Integer",
"status" : "String",
},
{ },
{ },
]
}
Response body:
{
"status" : "Integer",
"data" : [{
"id" : "Integer",
"createdOn" : "DateTime",
"subject" : "String",
"message" : "String",
"senderId" : "Integer",
"receiverId" : "Integer",
"parentMessageId" : "Integer",
"status" : "String",
}]
}
Request body:
{
"status" : "Integer",
"data" : [{
"createdOn" : "DateTime",
"subject" : "String",
"message" : "String",
"parentMessageId" : "Integer",
"status" : "String",
}]
}