Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thetonymaster/coffeboy
https://github.com/thetonymaster/coffeboy
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thetonymaster/coffeboy
- Owner: thetonymaster
- Created: 2015-01-12T22:37:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-20T23:01:35.000Z (almost 10 years ago)
- Last Synced: 2024-10-02T12:41:14.685Z (3 months ago)
- Language: Go
- Size: 1.26 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coffeboy
##Setup
First you should have a file structure like this: ````$GOPATH/src/github.com/crowdint```` then clone this repo inside the ````crowdint```` folder.Then get the godeps package ````go get github.com/tools/godep````.
Once downloaded, you should add the the bin folder to your PATH in your .bashrc file or equivalent:
````export PATH=$PATH:$GOPATH/bin````, and then reload or open a new terminal.Now you will be able to run ````godep restore```` to download all the depndencies.
##Examples
###Orders
Createcurl -i -X POST http://coffeboy.herokuapp.com/order --data-binary '{
"id":"R9999",
"user_id":1,
"created_at":"",
"updated_at":"",
"completed_at":"",
"email":"",
"total_quantity":"",
"line_items":[
{
"variant_id":"1",
"quantity":10
},
{
"variant_id":"2",
"quantity":20
}
]
}'Get
curl -i http://coffeboy.herokuapp.com/order/R9999
Updatecurl -i -X PUT http://coffeboy.herokuapp.com/order/R9999 --data-binary '{
"id":"R9999",
"user_id":1,
"created_at":"",
"updated_at":"",
"completed_at":"",
"email":"[email protected]",
"total_quantity":"",
"line_items":[
{
"variant_id":"1",
"quantity":10
},
{
"variant_id":"2",
"quantity":20
}
]
}'
Deletecurl -i -X DELETE http://coffeboy.herokuapp.com/order/R9999