Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 3.08 KB

README.md

File metadata and controls

37 lines (32 loc) · 3.08 KB

16807 Pious Academic, A Python Wrapper For H5

Current Version: 1.3

Version History

Future releases: Additional tests to verify integrity, work on profile requests, working BTBnet example

Version 1.3: Added samples, removed json, made sample scripts UNIX compatible, added config, refactored API classes.

Version 1.2: Added getmeta.py and a copy of my current local metadata JSON files. Just run getmeta.py and it will automatically create an up-to-date local copy of all the available meta data for you. NOTE: I provided a copy of all my current JSON files for you to save to make the process easier. You will still need to change the paths used to open and write into all the JSON files in the getmeta file.

Version 1.1: Added testfile.py that gives a demo on how to use all of the request functions, and has some more in-depth explanations about various nuances in the API. Also repaired a few bugs in the parameters used in functions with optional parameters. Much more stable and usable than 1.0.

Version 1.0: Cleaned up a few pieces of the code and added some documentation.

Version 0.2: Fixed most of the major bugs and issues, added the rate limit and error classes to have a more operational program. Updated rate limits to support 343's new 1 request per second rate.

Version 0.1: First skeleton release, full of bugs and other fun stuff.


Installing Pious Academic

Go here and sign into your microsoft account, then go to your profile. You should have an API key ready for you to use. Get it, save it, and for the love of god don't let anyone other than yourself see it.

The other prerequisite is to have the request module installed for Python. Run this in your terminal to install the module:

$ pip install requests

You can find the documentation for requests here, but it isn't important if you're just using the wrapper, only if you want to understand how it works.


Using Pious Academic

Using the module is fairly simple. Create your entry point main file and import the PiousAcademic class.

import PiousAcademic16807

Then you'll need to define the various apis as variable:

 meta = PiousAcademic16807.Metadata()
 profile = PiousAcademic16807.Profile()
 stats = PiousAcademic16807.Stats()

Now you're free to manipulate any of the functions in the API as you see fit. Simply include whatever parameters you are required to include and any optional parameters you want to use.

Addendum

This wrapper was made for my use with www.bigteambattle.net, a website leaderboards and more. I'll keep everyone updated on when my project is complete if I can make it public for an example of utilising the wrapper. Feel free to contact me here or at my personal website, www.davidskudra.ca, for any questions regarding this library or my work.