Skip to content

About

For StockX

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Golang Sneaker API

Prerequisites

Getting Started

Please install Golang and gcc before getting started.

  1. Starting in your $GOPATH, install the required go packages:
go get -u github.com/gorilla/mux
go get -u github.com/mattn/go-sqlite3
  1. Clone this repository:
git clone https://github.com/ktross/golang-sneaker-api.git src/github.com/ktross/golang-sneaker-api

API Endpoints

URL Method URL Params Data Params
/sneakers GET
/sneaker/:id GET id=[integer]
/sneaker POST name=[string]
/sneaker/:id DELETE id=[integer]
/sneaker/:id/true-to-size POST id=[integer] size=[integer]

Example HTTP Requests

GET /sneakers

curl -X GET \
  http://127.0.0.1:8001/sneakers \
  -H 'cache-control: no-cache'

GET /sneaker/:id

curl -X GET \
  http://127.0.0.1:8001/sneaker/1 \
  -H 'cache-control: no-cache'

POST /sneaker

curl -X POST \
  http://127.0.0.1:8001/sneaker \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{"name": "Example"}'

DELETE /sneaker/:id

curl -X DELETE \
  http://127.0.0.1:8001/sneaker/1 \
  -H 'cache-control: no-cache'

POST /sneaker/:id/true-to-size

curl -X POST \
  http://127.0.0.1:8001/sneaker/1/true-to-size \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{"sneakerid": "1", "size": "5"}'

About

For StockX

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages