public IActionResult GetAllTimeTotalSpending(string user, string apikey) { if (!api.validAPIKey(apikey)) { return(new UnauthorizedObjectResult("Invalid API key")); } return(api.serveJson(api.getSingleAttrJSON("Total", Convert.ToString(ans.getTotalSpending(user))))); }
public IActionResult getSubscriptionCount(string user, string apiKey) { if (!api.validAPIKey(apiKey)) { return(new UnauthorizedObjectResult("Invalid API key")); } return(api.serveJson(api.getSingleAttrJSON("SubCount", Convert.ToString(uas.getUserSubscriptionCount(user))))); }