/game-night-slack

A Slack interface to the Game Night API.

Primary LanguagePython

Game Night Slack

A Slack interface to the Game Night API.

Requirements

  • pip
  • Python 3
  • virtualenv

Setup

  1. Clone this repository.
  2. Create a virtual environment and activate it.
  3. Run pip install -r requirements.txt.
  4. Ask a CSH Gamemaster (manager of CSH Game Night) for an API key and set the environment variable GAME_NIGHT_API_KEY to that.
  5. Set the environment variable GAME_NIGHT_URL to the url of the Game Night API endpoint.
  6. Set the environment variable SLACK_VERIFICATION_TOKEN to the verification token generated by the Slack app.
  7. Run python wsgi.py.

Commands

info - Get information about a game.

Usage: /gn-info [-h|--help] name, where name is the name of the game. Note that the game name does not have to be an exact match; Game Night Slack will use fuzzy string matching to find the game that best fits the given name.

Example: /gn-info resistance - Retrieves information on the game The Resistance.

newest - Get the most recent games added to the database.

Usage: /gn-newest [OPTION...].

Example: /gn-newest --submitter mfrancis95 - Retrieves the most recently-added games that were submitted by me.

search - Search for all games that match a name regular expression.

Usage: /gn-search [OPTION...] [name], where name is any regular expression.

Example: /gn-search -o mfrancis95 -p 5 ^b - Retrieves all games that are owned by me, support 5 players, and start with the letter 'B'.

The optional arguments denoted as [OPTION...] are the following:

  • -h, --help - Print the usage information for the particular command.
  • -o, --owner - Narrow down the results by the specified game owner.
  • -p, --players - Narrow down the results by the supported number of players.
  • -s, --submitter - Narrow down the results by the specified game submitter.