def getValueList(args): if "dim" not in args: return { "error": "missing 'dim' parameter" } dimKey = args["dim"] values = statsdb.getTrackedValues("vote", dimKey) if dimKey == "partner": values = formatPartnerValueList(values) else: values = formatValueList(values) return values
def getValues(): objId = request.args.get("obj") dimKey = request.args.get("dim") return returnJSON(statsdb.getTrackedValues(objId, dimKey))