CategoryService
public struct CategoryService
Provides access to category operations
-
categories(budgetId:AsynchronouslastKnowledgeOfServer: ) Returns a list of budget categories.
Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
Declaration
Swift
public func categories( budgetId: String, lastKnowledgeOfServer: ServerKnowledge? = nil ) async throws -> ([CategoryGroupWithCategories], ServerKnowledge)Parameters
budgetIdThe id of the budget (last_used can also be used to specify the last used budget)
lastKnowledgeOfServerIf provided, only entities that have changed since
lastKnowledgeOfServerwill be included.Return Value
A list of category groups
-
category(budgetId:AsynchronouscategoryId: ) Returns a single category.
Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
Declaration
Swift
public func category(budgetId: String, categoryId: String) async throws -> CategoryParameters
budgetIdThe id of the budget (last_used can also be used to specify the last used budget)
categoryIdThe id of the category
Return Value
A single category
-
category(budgetId:Asynchronousmonth: categoryId: ) Returns a single category for a specific budget month.
Declaration
Swift
public func category( budgetId: String, month: String, categoryId: String ) async throws -> CategoryParameters
budgetIdThe id of the budget (last_used can also be used to specify the last used budget)
monthThe budget month in ISO format (e.g. 2016-12-01) (“current” can also be used to specify the current calendar month (UTC))
categoryIdThe id of the category
Return Value
A single category
-
updateCategory(budgetId:Asynchronousmonth: categoryId: budgeted: ) Update a category for a specific month.
Declaration
Swift
public func updateCategory( budgetId: String, month: String, categoryId: String, budgeted: Int ) async throws -> CategoryParameters
budgetIdThe id of the budget (last_used can also be used to specify the last used budget)
monthThe budget month in ISO format (e.g. 2016-12-01) (“current” can also be used to specify the current calendar month (UTC))
categoryIdThe id of the category
budgetedBudgeted amount for the category
Return Value
A single category
View on GitHub