All URIs are relative to https://api.youneedabudget.com/v1
Method | HTTP request | Description |
---|---|---|
getBudgetMonth | GET /budgets/{budget_id}/months/{month} | Single budget month |
getBudgetMonths | GET /budgets/{budget_id}/months | List budget months |
MonthDetailResponse getBudgetMonth(budgetId, month)
Single budget month
Returns a single budget month
// Import classes:
//import ynab.client.invoker.ApiClient;
//import ynab.client.invoker.ApiException;
//import ynab.client.invoker.Configuration;
//import ynab.client.invoker.auth.*;
//import ynab.client.api.MonthsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: bearer
ApiKeyAuth bearer = (ApiKeyAuth) defaultClient.getAuthentication("bearer");
bearer.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.setApiKeyPrefix("Token");
MonthsApi apiInstance = new MonthsApi();
UUID budgetId = new UUID(); // UUID | The ID of the Budget.
LocalDate month = new LocalDate(); // LocalDate | The Budget Month. \"current\" can also be used to specify the current calendar month (UTC).
try {
MonthDetailResponse result = apiInstance.getBudgetMonth(budgetId, month);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MonthsApi#getBudgetMonth");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
budgetId | UUID | The ID of the Budget. | |
month | LocalDate | The Budget Month. "current" can also be used to specify the current calendar month (UTC). |
- Content-Type: Not defined
- Accept: application/json
MonthSummariesResponse getBudgetMonths(budgetId)
List budget months
Returns all budget months
// Import classes:
//import ynab.client.invoker.ApiClient;
//import ynab.client.invoker.ApiException;
//import ynab.client.invoker.Configuration;
//import ynab.client.invoker.auth.*;
//import ynab.client.api.MonthsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: bearer
ApiKeyAuth bearer = (ApiKeyAuth) defaultClient.getAuthentication("bearer");
bearer.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.setApiKeyPrefix("Token");
MonthsApi apiInstance = new MonthsApi();
UUID budgetId = new UUID(); // UUID | The ID of the Budget.
try {
MonthSummariesResponse result = apiInstance.getBudgetMonths(budgetId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MonthsApi#getBudgetMonths");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
budgetId | UUID | The ID of the Budget. |
- Content-Type: Not defined
- Accept: application/json