The code for GwentAPI
GwentAPI is a RESTful API dedicated to provide information regarding GWENT®: The Witcher Card Game. You may use its interface to consume information on cards, factions, etc. You can find the API documentation at https://gwentapi.com/swagger/.
GwentAPI is release for both Linux and Windows. You can find the download here.
The data allowing you to seed the database is included in the releases. Read the file DATABASE_INSTRUCTIONS.md
to know how to feed the database.
Change the values found in config.toml
to suit your environment. The configuration file must be kept in the same directory as the executable.
Assuming you installed and configure all the required softwares listed above and that you have a working Go setup:
dep ensure
go get github.com/GwentAPI/gwentapi
vendor
directory to help build the software on CI platforms.go build
version
in main.go
before compiling or set it at compile time with the following command:
go build -ldflags="-X main.version=<versionString>"
baseURL
in the config.toml
file to change where resources are pointing to.The program will run on localhost on port 8080 by default.
Read the CONTRIBUTING.md
file.
At the time of writing, the artworks is taken from http://gwentify.com (a copy is saved, they aren't hotlinked). The files aren't included in the repo because git doesn't like binary files and neither do I like including binary files in git.