Package of utilities for server-side scripts in OpenGameData.
Project description
opengamedata-server
Repository for server-side scripts in opengamedata. In particular, this is where we have code for the OGD APIs.
Getting Started
Hello World of Flask
Steps to run:
- Check out latest
opengamedata-server
. - Run
pip install -r requirements.txt
to ensure you've got flask. - Run
flask run
. - Open localhost:5000 or localhost:5000/hello to see some really basic text output from the Flask server.
If Flask doesn't run, it's possible you'd need to first export FLASK_APP as an environment variable, set to "wsgi" (so in Bash, export FLASK_APP=wsgi). However, the script is named wsgi.py specifically because Flask is supposed to auto-detect it. So if this issue ever did come up, please ping Luke so he can look into it.
APIs
Below is a listing of the current API calls available, in function format to indicate what the request parameters.
For each API, there is also an api path, with path parameters in angle bracket (<, >) format.
Lastly, at this point in time, the <server_path>
is https://fieldday-web.wcer.wisc.edu/opengamedata.wsgi
Classroom API
Dashboard API
Hello API
Verify the API is alive
<server_path>/hello
GET()
- returns no value, and a success message
POST()
- returns no value, and a success message
PUT()
- returns no value, and a success message
Player API
Generate and save players
<server_path>/player
GET()
- returns an unused, randomized player name, or a null value and error message
PUT(str player_id, str name = None)
- Returns no value, and either a success or error message
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for opengamedata_api_utils-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d0c76f1112e754411fc576483f972aad4c459fa9943c5726a2f958d97e9fd20 |
|
MD5 | a22344e8dd1ebd385e01bb4bcd59cac9 |
|
BLAKE2b-256 | 013cf5681757dd22ba81388f0dbdf282731931c5e8b50f6bac7ff5a5d9ecbb78 |
Hashes for opengamedata_api_utils-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 585c998b8e5277d0b8830241ebaf0c64ac42d2ce7054bc89bc6457261b690aab |
|
MD5 | d21b83d50f6d5db5d936ce35a2cc0aa4 |
|
BLAKE2b-256 | 23385bf16b28ea40677f2e3639f3b71d823c910e62f4f4c7f2a99f9e89acc55e |