public IActionResult GetAllTimeCategoryPercentages(string user, string apikey) { if (!api.validAPIKey(apikey)) { return(new UnauthorizedObjectResult("Invalid API key")); } return(api.serveJson(ans.getJSON(ans.getAllTimeCategoryBreakdown(user)))); }
public IActionResult GetByID(long TID, string apiKey) { if (!api.validAPIKey(apiKey)) { return(new UnauthorizedObjectResult("Invalid API key")); } if (TID < 1) { return(BadRequest("Invalid TID")); } return(api.serveJson(ts.getJSON(ts.getUsingID(TID)))); }
public IActionResult GetSGByID(long SGID, string apiKey) { if (!api.validAPIKey(apiKey)) { return(new UnauthorizedObjectResult("Invalid API key")); } if (SGID < 1) { return(BadRequest("Invalid SGID specified")); } return(api.serveJson(sgs.getJSON(sgs.getUsingID(SGID)))); }
public IActionResult GetByID(long SID, string apiKey) { if (!api.validAPIKey(apiKey)) { return(new UnauthorizedResult()); } if (SID < 1) { return(BadRequest()); } return(api.serveJson(subservice.getJSON(subservice.getUsingID(SID)))); }
public IActionResult getReceipts(long accID, string apiKey) { if (!api.validAPIKey(apiKey)) { return(new UnauthorizedObjectResult("Invalid API key")); } if (accID < 1) { return(BadRequest("Invalid Account ID")); } return(api.serveJson(uas.getReceiptsFromAccount(accID))); }
public IActionResult getTransactions(long accID, string apiKey) { if (!api.validAPIKey(apiKey)) { return(new UnauthorizedObjectResult("Invalid API key")); } return(api.serveJson(uas.getTransactionsFromAccount(accID))); }