A sample API for Discount Ascii Warehouse shipped with docker
docker-compose up -d
Now you can make API requests, eg: curl -i localhost:8000/api/users/
Data will be generated automatically
-
params:
- username (string)
- ?limit (int)
-
response (json):
{
"purchases": [
{
"id": (int),
"product_id": (int),
"username": (string),
"date": (iso8601 string)
},
...
]
}
-
params:
- product_id (int)
- ?limit (int)
-
response: same as
GET purchases/by_user/:username
- body (json):
{
"username": (string)
"product_id": (int)
}
-
params:
- id (int)
-
response (json):
{
"id": (int),
"face": (string),
"size": (int),
"price": (int)
}
-
params:
- ?limit (int)
-
response (json):
{
"users": [
{
"username": (string),
"email": (string)
},
...
]
}
-
params:
- username (string)
-
response (json):
{
"username": (string),
"email": (string)
}