diff --git a/README.md b/README.md index cb6c4c1..dd17a9e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,14 @@ # 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 @@ -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 documentation including examples in multiple common langages (such as using Swagger) - ## Files | file | description | diff --git a/scripts/output.md b/scripts/output.md index 34c0308..745314a 100644 --- a/scripts/output.md +++ b/scripts/output.md @@ -1,3 +1,7 @@ +This is example output from wadl-map.py + +``` + 0: v1/player-spotlight method @@ -302,3 +306,4 @@ resource jersey:extended ++++++++++++++++++ +``` \ No newline at end of file diff --git a/scripts/wadl-map.py b/scripts/wadl-map.py index 2a4f6a4..e5e0425 100644 --- a/scripts/wadl-map.py +++ b/scripts/wadl-map.py @@ -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 xmltodict 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" attributes = [ "@path",