3个稳定版本
使用旧的Rust 2015
3.0.0 | 2019年11月7日 |
---|---|
2.0.0 | 2019年9月14日 |
1.0.0 | 2019年8月19日 |
#2364 在 数据库接口
被 2 crates 使用
195KB
3K SLoC
ynab-api的Rust API客户端
我们的API使用基于REST的设计,利用JSON数据格式,并依赖于HTTPS进行传输。我们使用有意义的HTTP响应代码进行响应,如果发生错误,我们将错误详细信息包含在响应体中。API文档在https://api.youneedabudget.com
概述
此API客户端由OpenAPI Generator项目生成。通过使用远程服务器上的openapi-spec,您可以轻松生成API客户端。
- API版本:1.0.0
- 包版本:2.0.0
- 构建包:org.openapitools.codegen.languages.RustClientCodegen
安装
将包放入您的项目文件夹中,并在Cargo.toml
中的[dependencies]
下添加以下内容
openapi = { path = "./generated" }
API端点文档
所有URI都是相对于 https://api.youneedabudget.com/v1
类 | 方法 | HTTP请求 | 描述 |
---|---|---|---|
AccountsApi | get_account_by_id | get /budgets/{budget_id}/accounts/{account_id} | 单个账户 |
AccountsApi | get_accounts | get /budgets/{budget_id}/accounts | 账户列表 |
BudgetsApi | get_budget_by_id | get /budgets/{budget_id} | 单个预算 |
BudgetsApi | get_budget_settings_by_id | get /budgets/{budget_id}/settings | 预算设置 |
BudgetsApi | get_budgets | get /budgets | 预算列表 |
CategoriesApi | get_categories | get /budgets/{budget_id}/categories | 分类列表 |
CategoriesApi | get_category_by_id | get /budgets/{budget_id}/categories/{category_id} | 单个分类 |
CategoriesApi | get_month_category_by_id | get /budgets/{budget_id}/months/{month}/categories/{category_id} | 特定预算月的单个分类 |
CategoriesApi | update_month_category | patch /budgets/{budget_id}/months/{month}/categories/{category_id} | 更新特定月份的分类 |
DeprecatedApi | bulk_create_transactions | post /budgets/{budget_id}/transactions/bulk | 批量创建事务 |
MonthsApi | get_budget_month | get /budgets/{budget_id}/months/{month} | 单个预算月 |
MonthsApi | get_budget_months | get /budgets/{budget_id}/months | 列出预算月份 |
PayeeLocationsApi | get_payee_location_by_id | get /budgets/{budget_id}/payee_locations/{payee_location_id} | 单个收款人位置 |
PayeeLocationsApi | get_payee_locations | get /budgets/{budget_id}/payee_locations | 列出收款人位置 |
PayeeLocationsApi | get_payee_locations_by_payee | get /budgets/{budget_id}/payees/{payee_id}/payee_locations | 列出收款人的位置 |
PayeesApi | get_payee_by_id | get /budgets/{budget_id}/payees/{payee_id} | 单个收款人 |
PayeesApi | get_payees | get /budgets/{budget_id}/payees | 列出收款人 |
ScheduledTransactionsApi | get_scheduled_transaction_by_id | get /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | 单个计划交易 |
ScheduledTransactionsApi | get_scheduled_transactions | get /budgets/{budget_id}/scheduled_transactions | 列出计划交易 |
TransactionsApi | create_transaction | post /budgets/{budget_id}/transactions | 创建单个交易或多个交易 |
TransactionsApi | get_transaction_by_id | get /budgets/{budget_id}/transactions/{transaction_id} | 单个交易 |
TransactionsApi | get_transactions | get /budgets/{budget_id}/transactions | 列出交易 |
TransactionsApi | get_transactions_by_account | get /budgets/{budget_id}/accounts/{account_id}/transactions | 列出账户交易 |
TransactionsApi | get_transactions_by_category | get /budgets/{budget_id}/categories/{category_id}/transactions | 列出类别交易 |
TransactionsApi | get_transactions_by_payee | get /budgets/{budget_id}/payees/{payee_id}/transactions | 列出收款人交易 |
TransactionsApi | update_transaction | put /budgets/{budget_id}/transactions/{transaction_id} | 更新现有交易 |
TransactionsApi | update_transactions | patch /budgets/{budget_id}/transactions | 更新多个交易 |
UserApi | get_user | get /user | 用户信息 |
模型文档
- Account
- AccountResponse
- AccountResponseData
- AccountsResponse
- AccountsResponseData
- BudgetDetail
- BudgetDetailAllOf
- BudgetDetailResponse
- BudgetDetailResponseData
- BudgetSettings
- BudgetSettingsResponse
- BudgetSettingsResponseData
- BudgetSummary
- BudgetSummaryResponse
- BudgetSummaryResponseData
- BulkResponse
- BulkResponseData
- BulkResponseDataBulk
- BulkTransactions
- CategoriesResponse
- CategoriesResponseData
- Category
- CategoryGroup
- CategoryGroupWithCategories
- CategoryGroupWithCategoriesAllOf
- CategoryResponse
- CategoryResponseData
- CurrencyFormat
- DateFormat
- ErrorDetail
- ErrorResponse
- HybridTransaction
- HybridTransactionAllOf
- HybridTransactionsResponse
- HybridTransactionsResponseData
- MonthDetail
- MonthDetailAllOf
- MonthDetailResponse
- MonthDetailResponseData
- MonthSummariesResponse
- MonthSummariesResponseData
- MonthSummary
- Payee
- PayeeLocation
- PayeeLocationResponse
- PayeeLocationResponseData
- PayeeLocationsResponse
- PayeeLocationsResponseData
- PayeeResponse
- PayeeResponseData
- PayeesResponse
- PayeesResponseData
- SaveCategoryResponse
- SaveCategoryResponseData
- SaveMonthCategory
- SaveMonthCategoryWrapper
- SaveTransaction
- SaveTransactionWrapper
- SaveTransactionsResponse
- SaveTransactionsResponseData
- SaveTransactionsWrapper
- ScheduledSubTransaction
- ScheduledTransactionDetail
- ScheduledTransactionDetailAllOf
- ScheduledTransactionResponse
- ScheduledTransactionResponseData
- ScheduledTransactionSummary
- ScheduledTransactionsResponse
- ScheduledTransactionsResponseData
- SubTransaction
- TransactionDetail
- TransactionDetailAllOf
- TransactionResponse
- TransactionResponseData
- TransactionSummary
- TransactionsResponse
- TransactionsResponseData
- UpdateTransaction
- UpdateTransactionAllOf
- UpdateTransactionsWrapper
- User
- UserResponse
- UserResponseData
要获取crate生成的文档,请使用
cargo doc --open
作者
Jesse Luehrs [email protected]
基于在https://github.com/ynab/ynab-sdk-js/blob/master/spec-v1-swagger.json找到的OpenAPI规范,由You Need A Budget, LLC提供
依赖
~19MB
~424K SLoC