Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodneyosodo/uber4freefood
https://github.com/rodneyosodo/uber4freefood
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/rodneyosodo/uber4freefood
- Owner: rodneyosodo
- License: mit
- Created: 2020-01-16T15:45:16.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T07:14:29.000Z (8 months ago)
- Last Synced: 2024-10-11T14:10:49.344Z (26 days ago)
- Language: Go
- Size: 22.8 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# uber4freefood
## Food Api###### Running
Clone files into go src directory
run `docker-compose up`###### port `*:8080`
###### Api Routes
`GET /food`
This return all the records from the table
```
{
"data": [
{
"id": 1,
"foodName": "",
"dietType": "",
"description": "",
"specialIngridients": "",
"serving": "",
"SpecialNote": "",
"foodImageId": "",
"locationLat": "",
"locationLong": "",
"status": ""
}
]
}
````POST /food`
This is used to create a record
```
{
"data": [
{
"foodName": "",
"dietType": "",
"description": "",
"specialIngridients": "",
"serving": "",
"SpecialNote": "",
"foodImageId": "",
"locationLat": "",
"locationLong": "",
"status": ""
}
]
}
```
`GET /food/:id`
return specific record from given id
```
{
"data": [
{
"foodName": "",
"dietType": "",
"description": "",
"specialIngridients": "",
"serving": "",
"SpecialNote": "",
"foodImageId": "",
"locationLat": "",
"locationLong": "",
"status": ""
}
]
}
```
PATCH /food/:id
Edit staus for food
`{"Status": ""}`
returns
```
{
"data": [
{
"id": 1,
"foodName": "",
"dietType": "",
"description": "",
"specialIngridients": "",
"serving": "",
"SpecialNote": "",
"foodImageId": "",
"locationLat": "",
"locationLong": "",
"status": ""
}
]
}
```
`DELETE /food/:id`
delete specified record
```
{
"data": true
}
```