https://github.com/schmichael/signup
https://github.com/schmichael/signup
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/schmichael/signup
- Owner: schmichael
- License: apache-2.0
- Created: 2014-10-29T03:10:12.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-29T05:00:11.000Z (over 11 years ago)
- Last Synced: 2025-01-26T00:11:37.702Z (over 1 year ago)
- Language: Go
- Size: 188 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## signup
### Running
```sh
go get github.com/schmichael/signup
signup
# Or from within $GOPATH/github.com/schmichael/signup
#go run main.go
# Then in another terminal (if you have httpie and jq installed)
http localhost:8000/api/list
export ITEMID=$(echo '{"description": "Test Item"}' | http POST localhost:8000/api/list | jq .id | sed -e 's/\"//g')
echo '{"user": "me!"}' | http POST localhost:8000/api/list/$ITEMID
```
### API
#### ``GET /api/list/``
Returns:
```json
{
"list": [
{"description": "some string", "user": "name if someone signed up"},
{"description": "again"}
]
}
```
#### ``POST /api/list/``
```json
{
"description": "some string"
}
```
Returns:
```json
{
"id": "some string"
}
```
#### ``POST /api/list/``
```json
{
"user": "some string"
}
```