Skip to content

ktross/golang-sneaker-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages