|
|
9 лет назад | |
|---|---|---|
| src | 9 лет назад | |
| Cargo.toml | 9 лет назад | |
| README.md | 9 лет назад | |
| e2e.js | 9 лет назад |
An implementation of a restful crud service in rust as a POC.

Redis
User object represents both users and vendors
curl -XPOST 127.0.0.1:3000/user -H "application/json" -d '{"id":"","name":"jake","password":"super secret", "email":"jake@jake.com","phone":"1239567","active":1,"products":[]}'
curl 127.0.0.1:3000/user/key-goes-here
curl 127.0.0.1:3000/users
Product object represents a ... product
curl -XPOST 127.0.0.1:3000/product -H "application/json" -d '{"id":"", "name":"MOUNTAIN DEWWWW", "price":"", "images":[]}'
curl 127.0.0.1:3000/product/key-goes-here
curl 127.0.0.1:3000/products
Image objects for users and products
curl -XPOST 127.0.0.1:3000/image -H "application/json" -d '{"id":"", "name":"Super dope haircut", "url":"http://i.imgur.com/oOtZe.jpg"}'
curl 127.0.0.1:3000/image/key-goes-here
curl 127.0.0.1:3000/images
Price for products
curl -XPOST 127.0.0.1:3000/price -H "application/json" -d '{"id":"", "user_id":"xxx", "product_id":"zzzz", "currency_code":"USD", "price":34}'
curl 127.0.0.1:3000/price/key-goes-here
curl 127.0.0.1:3000/prices
Appointment to exchance goods/services
curl -XPOST 127.0.0.1:3000/appointment -H "application/json" -d '{"id":"", "name":"xxx", "time":147324123, "confirmed":true, "user_id":"xxxx", "vendor_id":"xxxx", "product_id":"xxxx", "price_id":"xxxx"}'
curl 127.0.0.1:3000/appointment/key-goes-here
curl 127.0.0.1:3000/appointments