GithubHelp home page GithubHelp logo

travisbale / scorecard Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 214 KB

Golf score keeping API service for match play tournaments

License: MIT License

Dockerfile 0.30% Shell 0.09% Python 99.42% Mako 0.19%

scorecard's Introduction

Scorecard

"Gambling is illegal at Bushwood sir, and I never slice." ―Judge Smails

Scorecard is a score keeping API service for golf. Scorecard is able to provide live scoring updates for tournaments, as well as individual rounds of golf, and can support any number of players playing any format of golf.

API Reference

I haven't written a proper Postman collection to document the API, but in the meantime I've listed and partially described the available endpoints below.

GET /players

  • Get the list of players

POST /players

  • Create a new player
  • Players need to be issued a JWT with a corresponding email address if they want to log in to update their scores

GET /players/{id}

  • Get a specific player

PUT /players/{id}

  • Update an existing player

DELETE /players/{id}

  • Delete a specific player

GET /tournaments

  • Get the list of tournaments

POST /tournaments

  • Create a new tournament

GET /tournaments/{id}

  • Get a specific tournament

PUT /tournaments/{id}

  • Update an existing tournament

GET /tournament/{id}/organizers

  • Get the list of tournament organizers
  • Tournament organizers have admin privileges to the tournament
  • Organizers are just players

POST /tournament/{id}/organizers

  • Add organizers to the tournament

DELETE /tournament/{id}/organizers

  • Remove organizers from the tournament

GET /tournaments/{id}/teams

  • Get a list of teams playing in the tournament

POST /tournaments/{id}/teams

  • Add a new team to the tournament

DELETE /tournaments/{id}/teams

  • Remove the team from the tournament and delete it

GET /tournaments/{id}/teams{id}/players

  • Get the list of players on the particular team

POST /tournaments/{id}/teams{id}/players

  • Add new players to the team

DELETE /tournaments/{id}/teams{id}/players

  • Remove players from the team

GET /tournaments/{id}/rounds

  • Get the list of rounds in the tournament

POST /tournaments/{id}/rounds

  • Add a new round to the tournament

GET /tournaments/{id}/rounds/{id}

  • Get a specific round from the tournament

DELETE /tournaments/{id}/rounds/{id}

  • Remove and delete a specific round from the tournament

GET /tournaments/{id}/rounds/{id}/tee-times

  • Get a list of tee times for the tournament round

POST /tournaments/{id}/rounds/{id}/tee-times

  • Add a new tee time to the tournament round

GET /tournaments/{id}/rounds/{id}/tee-times/{id}

  • Get the details for a specific tee time including match results

DELETE /tournaments/{id}/rounds/{id}/tee-times/{id}

  • Delete the tee time

GET /tournaments/{id}/rounds/{id}/tee-times/{id}/players

  • Get the list of players assigned to the tee time

POST /tournaments/{id}/rounds/{id}/tee-times/{id}/players

  • Assign players to the tee time

DELETE /tournaments/{id}/rounds/{id}/tee-times/{id}/players

  • Unassign players from the tee time

GET /tournaments/{id}/rounds/{id}/tee-times/{id}/players/{id}/scores

  • Get the player's score

POST /tournaments/{id}/rounds/{id}/tee-times/{id}/players/{id}/scores

  • Record a new score for the player for the round

DELETE /tournaments/{id}/rounds/{id}/tee-times/{id}/players/{id}/scores

  • Delete a score for the player for the round

Development Setup

Scorecard runs in its own docker container and uses a postgres database. Before spinning up the containers there are a few environment variables that need to be defined in an env/dev.env file. There is a sample .env file in the root of the repository that contains all the required variables.

In order to authenticate with Scorecard, users will have to have a valid JWT issued to their email address. This token will be used to determine the level of access the user should be granted based on the roles and permissions the user has assigned to their token. In order to verify the validity of the tokens Scorecard receives, the public key of the public/private key pair used to sign the tokens must be added to the /keys directory. This will allow Scorecard to verify that the data contained in the token is authentic.

Once that is setup, the environment can be spun up by running docker-compose up -d.

Built with

License

MIT © Travis Bale

scorecard's People

Contributors

travisbale avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.