ogd-api-gamestates
Repository for the OpenGameData Player ID + State Saving API. These allow users of `opengamedata-unity` and `opengamedata-js-log` to obtain randomly-generated IDs to display for users, which can then be used to save and restore game states.
Science Score: 52.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
✓Institutional organization owner
Organization opengamedata has institutional domain (opengamedata.fielddaylab.wisc.edu) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.9%) to scientific vocabulary
Repository
Repository for the OpenGameData Player ID + State Saving API. These allow users of `opengamedata-unity` and `opengamedata-js-log` to obtain randomly-generated IDs to display for users, which can then be used to save and restore game states.
Basic Info
- Host: GitHub
- Owner: opengamedata
- License: mit
- Language: Python
- Default Branch: main
- Size: 42 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
- Releases: 0
Metadata Files
README.md
opengamedata-api-gamestates
Repository for the OpenGameData Player ID + State Saving API. These allow users of opengamedata-unity and opengamedata-js-log to obtain randomly-generated IDs to display for users, which can then be used to save and restore game states.
Getting Started
Hello World of Flask
Steps to run:
- Check out latest
opengamedata-server. - Run
pip install -r requirements.txtto 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 FLASKAPP as an environment variable, set to "wsgi" (so in Bash, export FLASKAPP=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
Player ID 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
GameState API
Save and retrieve game states
<server_path>/player/<player_id>/game/<game_id>/state:
GET(int count = 1, int offset = 0)
- Returns a list of game states, length == count, starting from the nth most-recent state, where n == offset, or a null value and an error message.
POST(str state)
- Attemps to save the state. Returns a null value and a success/error message.
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
Owner
- Name: Open Game Data
- Login: opengamedata
- Kind: organization
- Website: opengamedata.fielddaylab.wisc.edu
- Repositories: 11
- Profile: https://github.com/opengamedata
Open Game Data is a project out of the UW - Madison Field Day Lab to make datasets of anonymous play data public for science.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: opengamedata-api-gamestates
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- name: Field Day Lab
city: Madison
country: US
region: Wisconsin
website: 'https://fielddaylab.wisc.edu/'
- given-names: Luke
family-names: Swanson
email: lwswanson2@wisc.edu
affiliation: Field Day Lab
orcid: 'https://orcid.org/0000-0002-8455-7441'
- given-names: David
family-names: Gagnon
email: djgagnon@wisc.edu
affiliation: Field Day Lab
orcid: 'https://orcid.org/0000-0001-5126-0476'
repository-code: 'https://github.com/opengamedata/opengamedata-api-gamestates'
license: MIT
GitHub Events
Total
- Issues event: 2
Last Year
- Issues event: 2
Dependencies
- ./.github/actions/API_config * composite
- ./.github/actions/OGD_config * composite
- actions/checkout v3 composite
- actions/upload-artifact v2 composite
- burnett01/rsync-deployments 5.2 composite
- ./.github/actions/API_config * composite
- ./.github/actions/OGD_config * composite
- actions/checkout v3 composite
- actions/upload-artifact v2 composite
- burnett01/rsync-deployments 5.2 composite
- Flask-SocketIO ==5.3.6
- flask ==2.2.0
- flask-restful ==0.3.10
- google-auth ==2.27.0
- google-cloud-bigquery ==3.19.0
- mysql-connector-python ==8.0.25
- opengamedata-core ==0.0.6
- typing ==3.7.4.3
- werkzeug ==2.2.0