Created
October 17, 2014 11:51
-
-
Save jbmohler/3a270f679b283dcf27a7 to your computer and use it in GitHub Desktop.
Example with stubs for connecting to Sycamore Education
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import oauthlib | |
# Do oauth something or other | |
# https://pypi.python.org/pypi/oauthlib | |
# See http://docs.python-requests.org/en/latest/user/quickstart/#make-a-request | |
# replace place-holders -- Python string formatting is cool | |
r = requests.get('https://app.sycamoreeducation.com/api/v1/School/:schoolid/Directory/:id') | |
directory = json.loads(r.text) | |
# see http://api.sycamoresupport.com/school-endpoint-directory-family | |
for student in directory['Students']: | |
print student['FirstName'], student['Grade'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment