Beispiel #1
0
def team(api_version, team):
	"""
	Links all the available metrics of a team, as defined in teamlist.py and
	returns a combined JSON of all the available data.
	Only supports the 'teammetrics' project now.
	"""
	if team == "teammetrics":
		return simplejson.dumps(	[ models.extractMetrics(teams[team]["authorstats"],"authorstat"),
						models.extractMetrics(teams[team]["commitstats"],"commitstat"),
						models.extractMetrics(teams[team]["commitlines"],"commitlines")]
								)
	else:
		return jsonify(results="No data available. Try 'teammetrics' as team name.")
Beispiel #2
0
def teamMetrics(api_version, team, metric):
	"""
	Given a team and a particular metric, the available data is returned in JSON format.
	"""
	r = models.extractMetrics(team,metric)
	return simplejson.dumps([r])