def get_all_results(repo_id=53976):
 from collections import OrderedDict
 def get_results_from_builds(builds):
  dfs = OrderedDict()
  for build in builds:
   build_id = build['id']
   build_number = build['number']
   print(build_number)
   res = get_build_results(build_id)
   if (res is not None):
    dfs[build_number] = res
  return dfs
 base_url = 'https://api.travis-ci.org/builds?url=%2Fbuilds&repository_id={repo_id}'
 url = base_url.format(repo_id=repo_id)
 url_after = (url + '&after_number={after}')
 dfs = OrderedDict()
 while True:
  with closing(urlopen(url)) as r:
   if (not (200 <= r.getcode() < 300)):
    break
   builds = json.loads(r.read())
  res = get_results_from_builds(builds)
  if (not res):
   break
  last_build_number = min(res.keys())
  dfs.update(res)
  url = url_after.format(after=last_build_number)
 return dfs

def get_all_results ( repo_id = 53976 ) : from collections import OrderedDict def get_results_from_builds ( builds ) : dfs = OrderedDict ( ) for build in builds : build_id = build [ 'id' ] build_number = build [ 'number' ] print ( build_number ) res = get_build_results ( build_id ) if ( res is not None ) : dfs [ build_number ] = res return dfs base_url = 'https://api.travis-ci.org/builds?url=%2Fbuilds&repository_id={repo_id}' url = base_url . format ( repo_id = repo_id ) url_after = ( url + '&after_number={after}' ) dfs = OrderedDict ( ) while True : with closing ( urlopen ( url ) ) as r : if ( not ( 200 <= r . getcode ( ) < 300 ) ) : break builds = json . loads ( r . read ( ) ) res = get_results_from_builds ( builds ) if ( not res ) : break last_build_number = min ( res . keys ( ) ) dfs . update ( res ) url = url_after . format ( after = last_build_number ) return dfs
fetches the vbench results for all travis builds .