import requests

params = {
  'key': '1kekecMN31fxge0j'
}
response = requests.get('http://api.asg.northwestern.edu/terms/', params=params)
# calling response.json() returns the response as a Python dictionary or list
print response.json()
@@ -1,8 +1,700 @@
+%22%22%22%0A%09This script uses Northwestern University's course API to gather information about offered courses.The API is structured in a way that certain queries can only be made with a minimum number of parameters. Thus, the process for arriving at a JSON file with all the courses offered in one term is as follows:%0A%0A%09%091) Retrieve list of all terms.%0A%09%092) Retrieve unique ID of latest term available.%0A%09%093) Use unique ID of term to retrive list of all subjects for which courses are being offered for that term.%0A%09%094) Retrieve subject ID for each of those subjects.%0A%09%095) Use unique ID of term and subject ID to retrieve list of all courses offered for each subject being offered in that term. %0A%0A%22%22%22%0A%0A
 import r
@@ -719,16 +719,16 @@
 %7B%0A  
-'key': '
+%22key%22: %22
 1kek
@@ -743,37 +743,34 @@
 ge0j
-'%0A%7D%0Aresponse = requests.get('
+%22 #api key%0A%7D%0A%0Abase_url = %22
 http
@@ -801,15 +801,111 @@
 edu/
-terms/'
+%22%0A%0A# get response from api call to get json of all the terms%0Aresponse = requests.get(base_url + %22terms%22
 , pa
@@ -921,103 +921,342 @@
 ms)%0A
+%0A
 # 
-calling response.json() returns the response as a Python dictionary or list%0Aprint response.json()
+turn response into a json file%0Aresponse_json = response.json()%0A%0A# latest term info is always in the first index of the json file%0Alatest_term = response_json%5B0%5D%0A%0A# get the unique id of latest term%0Alatest_term_id = latest_term%5B%22id%22%5D%0A%0A# get response from api call to get json of all subjects available for each term%0Aprint latest_term_id%0A%0A

add description to python file