コード例 #1
0
 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))));
 }
コード例 #2
0
 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))));
 }
コード例 #3
0
 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))));
 }
コード例 #4
0
 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))));
 }
コード例 #5
0
 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)));
 }
コード例 #6
0
 public IActionResult getTransactions(long accID, string apiKey)
 {
     if (!api.validAPIKey(apiKey))
     {
         return(new UnauthorizedObjectResult("Invalid API key"));
     }
     return(api.serveJson(uas.getTransactionsFromAccount(accID)));
 }