Created
February 9, 2018 18:32
-
-
Save kcbighuge/3dfe2efd0876f3482b9f655b761d05b5 to your computer and use it in GitHub Desktop.
create new submission request
This file contains hidden or 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 requests | |
import json | |
TOKEN = '... insert your token ...' | |
headers = {'Authorization': TOKEN, 'Content-Length': '0'} | |
CREATE_REQUEST_URL = 'https://review-api.udacity.com/api/v1/submission_requests.json' | |
project_language_pairs = [ | |
{u'project_id': 238, u'language': u'en-us'}, # SDC: Traffic Sign Classification | |
{u'project_id': 108, u'language': u'en-us'}, # Machine Learning Capstone Project | |
### add more projects here | |
] | |
create_resp = requests.post(CREATE_REQUEST_URL, | |
json={'projects': project_language_pairs}, | |
headers=headers) | |
print json.loads(create_resp.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment