def main(): client = gciclient.GCIAPIClient(auth_token=FLAGS.apikey, url_prefix=FLAGS.url, debug=FLAGS.debug) for filename in FLAGS.files: upload(client, filename)
def main(): print("GCI Quotient: noun | gē-sē-ī kwō-shənt") print(" \"the magnitude of a specified characteristic or quality\"") client = gciclient.GCIAPIClient(auth_token=FLAGS.apikey, url_prefix=FLAGS.url) value = '' with open('sacsid_cookie.txt', 'r') as cookie_file: for line in cookie_file: value = line break cookie_file.close() value = value.replace('\n', '') cookies = {'SACSID': value} try: os.mkdir(FLAGS.datadir) except OSError as e: if e.errno != errno.EEXIST: raise if os.path.isdir(FLAGS.datadir): print('...saving GCI data to [%s]' % FLAGS.datadir) save_tasks(FLAGS.datadir, client, cookies) save_instances(FLAGS.datadir, client, cookies)
def main(): print("GCI Product: noun | gē-sē-ī prŏd-əkt") print(" \"the triviality of a specified characteristic or quality\"") client = gciclient.GCIAPIClient(auth_token=FLAGS.apikey, url_prefix=FLAGS.url) if not os.path.isdir(FLAGS.datadir): print('...data directory does not exist! [%s]' % FLAGS.datadir) exit(1) else: print('...reading GCI task data from [%s]' % FLAGS.datadir) make_tasks(FLAGS.datadir, client)
def main(): client = gciclient.GCIAPIClient(auth_token=FLAGS.apikey, url_prefix=FLAGS.url, debug=FLAGS.debug) next_page = 1 while next_page > 0: tasks = client.ListTasks(page=next_page) for t in tasks['results']: print '\t'.join([str(t['id']), t['name'].encode('utf-8')]) next_page = 0 if tasks['next']: result = re.search(r'page=(\d+)', tasks['next']) if result: next_page = result.group(1)
def main(): client = gciclient.GCIAPIClient(auth_token=FLAGS.apikey, url_prefix=FLAGS.url, debug=FLAGS.debug) next_page = 1 while next_page > 0: instances = client.ListTaskInstances(page=next_page) for ti in instances['results']: print '\t'.join([ str(ti['id']), # yapf: disable ti['status'].encode('utf-8'), ti['student_display_name'].encode('utf-8'), ti['task_definition_name'].encode('utf-8') ]) next_page = 0 if instances['next']: result = re.search(r'page=(\d+)', instances['next']) if result: next_page = result.group(1)