Card Games REST API in GO
Simple RESTful API for Card games. with database implementation
Quick Start
# Install mux router
cd /main
go get -u github.com/gorilla/mux
# update mongo url
in DataBase/connector.go
update var mongoUrl with your database user name & password
# start the api server
cd /main
go run main.go
# to run tests
cd /main/Test
go test -v
Endpoints
open deck
GET localhost:8001/api/Deck/{id}
Create Deck
POST localhost:8001/api/Deck
# Request sample
# {
# "shuffled" : true,
# "cards":"AH,AS,AD,AC"
# }
Draw a card
POST localhost:8001/api/Deck/{id}/draw
# Request sample
# {
# "count":2
# }