mirror of
https://gitlab.com/dword4/nhlapi
synced 2024-11-21 18:14:55 +00:00
updated a bunch of things and cleaned up script output file
This commit is contained in:
parent
e9e9e9a76b
commit
58b0d192cd
10
README.md
10
README.md
@ -1,5 +1,14 @@
|
|||||||
# NHL API Documentation
|
# NHL API Documentation
|
||||||
|
|
||||||
|
## Latest News
|
||||||
|
|
||||||
|
### 2024-11-02
|
||||||
|
|
||||||
|
The NHL has kindly provided us with a very handy (but ugly) file called application.wadl which documents their entire API. I have taken some time and written a python script (scripts/wadl-map.py) that automatically querries the endpoint that provides the file, converst the XML to JSON and parses it out in a simple but understandable format. The markdown file in the scripts folder provides an example of the output.
|
||||||
|
|
||||||
|
**This is a work in progress** - use it at your own discretion, eventually it will be updated to create a much nicer output, possibly even with markdown formatting and will eventually be setup on a website to auto-update every so often and provide browsable documentation that requires less maintenance than the hand-written documentation that exists now.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
## About this Project
|
## About this Project
|
||||||
|
|
||||||
@ -13,7 +22,6 @@ Eventually build documentation on features such as cayenneExp which allows for
|
|||||||
retrieval of very complex documentation and perhaps even a more thorough set of
|
retrieval of very complex documentation and perhaps even a more thorough set of
|
||||||
documentation including examples in multiple common langages (such as using Swagger)
|
documentation including examples in multiple common langages (such as using Swagger)
|
||||||
|
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|
||||||
| file | description |
|
| file | description |
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
This is example output from wadl-map.py
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
0: v1/player-spotlight
|
0: v1/player-spotlight
|
||||||
method
|
method
|
||||||
|
|
||||||
@ -302,3 +306,4 @@ resource
|
|||||||
jersey:extended
|
jersey:extended
|
||||||
|
|
||||||
++++++++++++++++++
|
++++++++++++++++++
|
||||||
|
```
|
@ -1,7 +1,25 @@
|
|||||||
|
"""
|
||||||
|
|
||||||
|
Description: A simple script to query the NHL API and generate simple
|
||||||
|
documentation
|
||||||
|
|
||||||
|
License: MIT, see LICENSE file for more details
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import xmltodict
|
import xmltodict
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
__author__ = 'Drew Hynes'
|
||||||
|
__copyright__ = 'Copyright 2024, NHL API Documentation'
|
||||||
|
__credits__ = ['Kevin Sidwar','Jon Ursenbach']
|
||||||
|
__license__ = 'MIT'
|
||||||
|
__version__ = '0.0.1'
|
||||||
|
__maintainer__ = 'Drew Hynes'
|
||||||
|
__email__ = 'drew.hynes@gmail.com'
|
||||||
|
__status__ = 'Alpha'
|
||||||
|
|
||||||
url = "https://api-web.nhle.com/application.wadl?detail=true"
|
url = "https://api-web.nhle.com/application.wadl?detail=true"
|
||||||
attributes = [
|
attributes = [
|
||||||
"@path",
|
"@path",
|
||||||
|
Loading…
Reference in New Issue
Block a user