FetchRewards Backend Engineering take-home assignment
- cd into the project root (where the make file is)
- Build the package using
make package
, this will install the required python packages - Run the unittests using
make test
- Start the app using
make app
- This should start the HTTP server on port 8001
- Go to Docs
- This opens Swagger docs, where we can trigger the endpoints using the UI
- Make sure docker daemon is started and running
- Run
make docker
, this will build a image and spinup the container - Go to Docs
- This opens Swagger docs, where we can trigger the endpoints using the UI
Testing Payload for the add
transaction
[
{
"payer": "DANNON",
"points": 300,
"timestamp": "2022-10-31T10:00:00Z"
},
{
"payer": "UNILEVER",
"points": 200,
"timestamp": "2022-10-31T11:00:00Z"
},
{
"payer": "DANNON",
"points": -200,
"timestamp": "2022-10-31T15:00:00Z"
},
{
"payer": "MILLER COORS",
"points": 10000,
"timestamp": "2022-11-01T14:00:00Z"
},
{
"payer": "DANNON",
"points": 1000,
"timestamp": "2022-11-02T14:00:00Z"
}
]