public static Enum getTransactions() { string getTransactionsUrl = "https://developer.api.yodlee.com:443/ysl/restserver/v1/transactions"; List <string> headers = new List <string>(); headers.Add("Authorization:{cobSession= " + authTokens["cobSession"] + ",userSession=" + authTokens["userSession"] + "}"); Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters["fromDate"] = "2013-01-01"; parameters["toDate"] = "2017-05-05"; Logger.Log("Obtaining Transactions"); string jsonResponse = Web.httpGet(getTransactionsUrl, headers, parameters); if (jsonResponse == null) { Logger.Log("Your session has timed out\n \r"); return(Status.FAILURE); } else { string fName = "transactions.json"; JsonFileHandler.CreateJsonOutFile(jsonResponse, fName); Logger.Log("Writing account transaction information to file " + fName); return(Status.SUCCESS); } }
public static Enum getAccounts() { string getAccountUrl = "https://developer.api.yodlee.com:443/ysl/restserver/v1/accounts"; List <string> header = new List <string>(); header.Add("Authorization:{cobSession= " + authTokens["cobSession"] + ",userSession=" + authTokens["userSession"] + "}"); Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters["status"] = ""; parameters["container"] = ""; parameters["providerAccountID"] = ""; Logger.Log("Obtaining Account information"); string jsonResponse = Web.httpGet(getAccountUrl, header, parameters); if (jsonResponse == null) { Logger.Log("Your session has timed out\n \r"); return(Status.FAILURE); } else { string fName = "accounts.json"; JsonFileHandler.CreateJsonOutFile(jsonResponse, fName); Logger.Log("Writing account information to file " + fName); return(Status.SUCCESS); } }