Skip to content

Latest commit

 

History

History
547 lines (387 loc) · 19.7 KB

ObjectGroupsApi.md

File metadata and controls

547 lines (387 loc) · 19.7 KB

firefly_iii_client.ObjectGroupsApi

All URIs are relative to https://demo.firefly-iii.org/api

Method HTTP request Description
delete_object_group DELETE /v1/object-groups/{id} Delete a object group.
get_object_group GET /v1/object-groups/{id} Get a single object group.
list_bill_by_object_group GET /v1/object-groups/{id}/bills List all bills with this object group.
list_object_groups GET /v1/object-groups List all oject groups.
list_piggy_bank_by_object_group GET /v1/object-groups/{id}/piggy-banks List all piggy banks related to the object group.
update_object_group PUT /v1/object-groups/{id} Update existing object group.

delete_object_group

delete_object_group(id, x_trace_id=x_trace_id)

Delete a object group.

Delete a object group.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.ObjectGroupsApi(api_client)
    id = '123' # str | The ID of the object group.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Delete a object group.
        api_instance.delete_object_group(id, x_trace_id=x_trace_id)
    except Exception as e:
        print("Exception when calling ObjectGroupsApi->delete_object_group: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the object group.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

void (empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Object group deleted. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

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

get_object_group

ObjectGroupSingle get_object_group(id, x_trace_id=x_trace_id)

Get a single object group.

Get a single object group.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.object_group_single import ObjectGroupSingle
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.ObjectGroupsApi(api_client)
    id = '123' # str | The ID of the object group.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Get a single object group.
        api_response = api_instance.get_object_group(id, x_trace_id=x_trace_id)
        print("The response of ObjectGroupsApi->get_object_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ObjectGroupsApi->get_object_group: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the object group.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

ObjectGroupSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 The requested object group -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

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

list_bill_by_object_group

BillArray list_bill_by_object_group(id, x_trace_id=x_trace_id, limit=limit, page=page)

List all bills with this object group.

List all bills with this object group.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.bill_array import BillArray
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.ObjectGroupsApi(api_client)
    id = '123' # str | The ID of the account.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    limit = 10 # int | Number of items per page. The default pagination is per 50 items. (optional)
    page = 1 # int | Page number. The default pagination is per 50 items. (optional)

    try:
        # List all bills with this object group.
        api_response = api_instance.list_bill_by_object_group(id, x_trace_id=x_trace_id, limit=limit, page=page)
        print("The response of ObjectGroupsApi->list_bill_by_object_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ObjectGroupsApi->list_bill_by_object_group: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the account.
x_trace_id str Unique identifier associated with this request. [optional]
limit int Number of items per page. The default pagination is per 50 items. [optional]
page int Page number. The default pagination is per 50 items. [optional]

Return type

BillArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of bills. -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

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

list_object_groups

ObjectGroupArray list_object_groups(x_trace_id=x_trace_id, limit=limit, page=page)

List all oject groups.

List all oject groups.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.object_group_array import ObjectGroupArray
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.ObjectGroupsApi(api_client)
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    limit = 10 # int | Number of items per page. The default pagination is per 50 items. (optional)
    page = 1 # int | Page number. The default pagination is per 50 items. (optional)

    try:
        # List all oject groups.
        api_response = api_instance.list_object_groups(x_trace_id=x_trace_id, limit=limit, page=page)
        print("The response of ObjectGroupsApi->list_object_groups:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ObjectGroupsApi->list_object_groups: %s\n" % e)

Parameters

Name Type Description Notes
x_trace_id str Unique identifier associated with this request. [optional]
limit int Number of items per page. The default pagination is per 50 items. [optional]
page int Page number. The default pagination is per 50 items. [optional]

Return type

ObjectGroupArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of object groups -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

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

list_piggy_bank_by_object_group

PiggyBankArray list_piggy_bank_by_object_group(id, x_trace_id=x_trace_id, limit=limit, page=page)

List all piggy banks related to the object group.

This endpoint returns a list of all the piggy banks connected to the object group.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.piggy_bank_array import PiggyBankArray
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.ObjectGroupsApi(api_client)
    id = '123' # str | The ID of the account.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)
    limit = 10 # int | Number of items per page. The default pagination is per 50 items. (optional)
    page = 1 # int | Page number. The default pagination is per 50 items. (optional)

    try:
        # List all piggy banks related to the object group.
        api_response = api_instance.list_piggy_bank_by_object_group(id, x_trace_id=x_trace_id, limit=limit, page=page)
        print("The response of ObjectGroupsApi->list_piggy_bank_by_object_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ObjectGroupsApi->list_piggy_bank_by_object_group: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the account.
x_trace_id str Unique identifier associated with this request. [optional]
limit int Number of items per page. The default pagination is per 50 items. [optional]
page int Page number. The default pagination is per 50 items. [optional]

Return type

PiggyBankArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 A list of piggy banks -
400 Bad request -
401 Unauthenticated -
404 Page not found -
500 Internal exception -

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

update_object_group

ObjectGroupSingle update_object_group(id, object_group_update, x_trace_id=x_trace_id)

Update existing object group.

Update existing object group.

Example

  • OAuth Authentication (firefly_iii_auth):
  • Bearer Authentication (local_bearer_auth):
import firefly_iii_client
from firefly_iii_client.models.object_group_single import ObjectGroupSingle
from firefly_iii_client.models.object_group_update import ObjectGroupUpdate
from firefly_iii_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://demo.firefly-iii.org/api
# See configuration.py for a list of all supported configuration parameters.
configuration = firefly_iii_client.Configuration(
    host = "https://demo.firefly-iii.org/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Configure Bearer authorization: local_bearer_auth
configuration = firefly_iii_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with firefly_iii_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = firefly_iii_client.ObjectGroupsApi(api_client)
    id = '123' # str | The ID of the object group
    object_group_update = firefly_iii_client.ObjectGroupUpdate() # ObjectGroupUpdate | JSON array with updated piggy bank information. See the model for the exact specifications.
    x_trace_id = 'x_trace_id_example' # str | Unique identifier associated with this request. (optional)

    try:
        # Update existing object group.
        api_response = api_instance.update_object_group(id, object_group_update, x_trace_id=x_trace_id)
        print("The response of ObjectGroupsApi->update_object_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ObjectGroupsApi->update_object_group: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the object group
object_group_update ObjectGroupUpdate JSON array with updated piggy bank information. See the model for the exact specifications.
x_trace_id str Unique identifier associated with this request. [optional]

Return type

ObjectGroupSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/vnd.api+json, application/json

HTTP response details

Status code Description Response headers
200 Updated object group stored, result in response -
400 Bad request -
401 Unauthenticated -
404 Page not found -
422 Validation error. The body will have the exact details. -
500 Internal exception -

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