https://github.com/haaroon/video-game-rest-api
A video-game-rest-api written in python using djangorestframework
https://github.com/haaroon/video-game-rest-api
Last synced: 2 months ago
JSON representation
A video-game-rest-api written in python using djangorestframework
- Host: GitHub
- URL: https://github.com/haaroon/video-game-rest-api
- Owner: Haaroon
- Created: 2016-03-16T16:15:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-15T22:18:58.000Z (about 9 years ago)
- Last Synced: 2025-02-10T09:44:01.129Z (4 months ago)
- Language: Python
- Size: 122 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
README.md
------------
Registration
---------------------------
Obtaining an authorization token
---------------
curl --data http://videogames-haaroony.apps.devcloud.eecs.qmul.ac.uk/api-token-auth/---------------
Calling a GET requires the following call,
no authentication token is required
---------------
curl -X GET http://videogames-haaroony.apps.devcloud.eecs.qmul.ac.uk/users/ -H ''
curl -X GET http://videogames-haaroony.apps.devcloud.eecs.qmul.ac.uk/review/ -H ''
curl -X GET http://videogames-haaroony.apps.devcloud.eecs.qmul.ac.uk/videogames/ -H ''
curl -X GET http://videogames-haaroony.apps.devcloud.eecs.qmul.ac.uk/genres/ -H ''
curl -X GET http://videogames-haaroony.apps.devcloud.eecs.qmul.ac.uk/platform/ -H ''
curl -X GET http://videogames-haaroony.apps.devcloud.eecs.qmul.ac.uk/developer/ -H ''---------------
Calling a POST requets requires an authorization token
---------------
e.g. posting a reviewcurl -H "Authorization:Token XXX" -H "Content-Type:son" -X POST -d '{"heading":"test","body":"test","game":{"title":"Cubic Ninja"},"rating":"2"}' http://127.0.0.1:8000/review/
Different renderes installed
XML renderer - pip install djangorestframework-xml
YAML renderer - pip install djangorestframework-yaml
JSONP Renderer - pip install djangorestframework-jsonp
CSV Renderer - pip install djangorestframework-csv
Swagger api - pip install django-rest-swagger