Skip to content

Latest commit

 

History

History
120 lines (84 loc) · 3.56 KB

MonthsApi.md

File metadata and controls

120 lines (84 loc) · 3.56 KB

ynab.MonthsApi

All URIs are relative to https://api.youneedabudget.com/v1

Method HTTP request Description
get_budget_month GET /budgets/{budget_id}/months/{month} Single budget month
get_budget_months GET /budgets/{budget_id}/months List budget months

get_budget_month

MonthDetailResponse get_budget_month(budget_id, month)

Single budget month

Returns a single budget month

Example

from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint

# Configure API key authorization: bearer
configuration = ynab.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = ynab.MonthsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | The ID of the Budget.
month = '2013-10-20' # date | The Budget Month.  \"current\" can also be used to specify the current calendar month (UTC).

try:
    # Single budget month
    api_response = api_instance.get_budget_month(budget_id, month)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MonthsApi->get_budget_month: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str The ID of the Budget.
month date The Budget Month. "current" can also be used to specify the current calendar month (UTC).

Return type

MonthDetailResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_budget_months

MonthSummariesResponse get_budget_months(budget_id)

List budget months

Returns all budget months

Example

from __future__ import print_function
import time
import ynab
from ynab.rest import ApiException
from pprint import pprint

# Configure API key authorization: bearer
configuration = ynab.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = ynab.MonthsApi(ynab.ApiClient(configuration))
budget_id = 'budget_id_example' # str | The ID of the Budget.

try:
    # List budget months
    api_response = api_instance.get_budget_months(budget_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MonthsApi->get_budget_months: %s\n" % e)

Parameters

Name Type Description Notes
budget_id str The ID of the Budget.

Return type

MonthSummariesResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]