# Oyez API Wrapper
This library is used to access the API of [oyez.org](oyez.org) and parse the data into easily usable chunks. All included functions are included below. 

#### Importing the Library & Making an court_case Object
```python
import oyez_api_wrapper

case_obj = oyez_api_wrapper.court_case("2015", "15-278")
```
The library can be imported and objects can be created using the above syntax. The first argument is the "Year" and the other argument is the "Docket NO.". This information is available on [oyez.org](oyez.org) under any case.  

#### Class Functions
`get_case_judges` will return all judges that decided the case. <br>
`get_case_facts` will return the facts of the case item. The HTML parameter is provided for pretty printing it later. <br>
`download_court_json` will download the case JSON to the current directory. <br>
`get_judge_decisions` will return a dictionary of the justices' as keys and their decision (majority/minority). <br>
`get_ruling` will return a tuple with majority vote, minority vote, winning party, decision type, and a reference to the decision page. <br>
`get_basic_info` will return a tuple with the case name and both parties in order. <br>
`get_legal_question` will return the legal question of the case. The HTML parameter is provided for pretty printing it later. <br>
`get_conclusion` will return the conclusion of the case. The HTML parameter is provided for pretty printing it later. <br>
`get_lower_court` will return the previous court the case was at before reaching the Supreme Court. <br>
`get_audio_links` will return a dictionary that is contains the title as the key and the value as the link to listen to the audio available. <br>

-----------------------
The owner of this repo has no relation with [oyez.org](oyez.org)!
