#api #api-client #信息 #生成 #btcpay #btc-pay

btcpay-client

BTCPay Server 的客户端库

1 个不稳定版本

0.1.0 2022年11月10日

302 in #信息

MIT 许可证

655KB
9K SLoC

Rust API 客户端用于 openapi

使用 BTCPay Server 的完整 API

更多信息,请访问 https://btcpayserver.org

概述

此 API 客户端是由 OpenAPI Generator 项目生成的。通过使用远程服务器上的 openapi-spec,您可以轻松生成 API 客户端。

AE 的说明

为了使 openapi 正常工作,我们不得不 A) 稍微更改 swagger.json 定义(基本上添加了一些路径变量和一个未指定的定义),请参阅添加的 swagger.json B) 处理一些不可解析的 oneOfEntries C) 重新定义 timespan 结构为类型重定义。因此,它并非完全自动生成。

  • API 版本:v1
  • 包版本:v1
  • 构建包: org.openapitools.codegen.languages.RustClientCodegen

安装

将包放入名为 openapi 的目录中,并将以下内容添加到 Cargo.toml 中的 [dependencies]

openapi = { path = "./openapi" }

API 端点文档

所有 URI 都是相对于 https://btcpay.example.com/api/v1

方法 HTTP 请求 描述
APIKeysApi api_keys_create_api_key POST /api/v1/api-keys 创建一个新的 API 密钥
APIKeysApi api_keys_delete_api_key DELETE /api/v1/api-keys/{apikey} 吊销 API 密钥
APIKeysApi api_keys_delete_current_api_key DELETE /api/v1/api-keys/current 吊销当前 API 密钥
APIKeysApi api_keys_get_current_api_key GET /api/v1/api-keys/current 获取当前 API 密钥信息
AppsApi apps_create_point_of_sale_app POST /api/v1/stores/{storeId}/apps/pos 创建一个新的销售点应用
AppsApi apps_delete_point_of_sale_app DELETE /api/v1/apps/{appId} 删除应用
AppsApi apps_get_point_of_sale_app GET /api/v1/apps/{appId} 获取基本应用数据
AuthorizationApi api_keys_authorize GET /api-keys/authorize 授权用户
CustodiansApi custodians_add_store_custodian_account POST /api/v1/stores/{storeId}/custodian-accounts 将托管账户添加到商店。
CustodiansApi custodians_delete_store_custodian_account DELETE /api/v1/stores/{storeId}/custodian-accounts/{accountId} 删除商店托管账户
CustodiansApi custodians_get_store_custodian_account GET /api/v1/stores/{storeId}/custodian-accounts/{accountId} 获取店铺保管账户
CustodiansApi custodians_get_store_custodian_account_deposit_address GET /api/v1/stores/{storeId}/custodian-accounts/{accountId}/addresses/{paymentMethod} 获取保管账户的存款地址
CustodiansApi custodians_get_store_custodian_account_trade_quote GET /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/quote 获取资产间交易的报价
CustodiansApi custodians_get_store_custodian_account_withdrawal_info POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals/{withdrawalId} 获取提款信息
CustodiansApi custodians_get_store_custodian_accounts GET /api/v1/stores/{storeId}/custodian-accounts 列出店铺保管账户
CustodiansApi custodians_get_supported_custodians GET /api/v1/custodians 列出支持的保管人
CustodiansApi custodians_store_custodian_account_trade_market POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/market 资产间交易
CustodiansApi custodians_update_store_custodian_account PUT /api/v1/stores/{storeId}/custodian-accounts/{accountId} 更新保管账户
CustodiansApi custodians_withdraw_from_store_custodian_account POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals 从店铺保管账户提款
HealthApi health_get_health GET /api/v1/health 获取健康状态
InvoicesApi invoices_activate_payment_method POST /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods/{paymentMethod}/activate 激活支付方式
InvoicesApi invoices_archive_invoice DELETE /api/v1/stores/{storeId}/invoices/{invoiceId} 归档发票
InvoicesApi invoices_create_invoice POST /api/v1/stores/{storeId}/invoices 创建新发票
InvoicesApi invoices_get_invoice GET /api/v1/stores/{storeId}/invoices/{invoiceId} 获取发票
InvoicesApi invoices_get_invoice_payment_methods GET /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods 获取发票支付方式
InvoicesApi invoices_get_invoices GET /api/v1/stores/{storeId}/invoices 获取发票
InvoicesApi invoices_mark_invoice_status POST /api/v1/stores/{storeId}/invoices/{invoiceId}/status 标记发票状态
InvoicesApi invoices_unarchive_invoice POST /api/v1/stores/{storeId}/invoices/{invoiceId}/unarchive 取消归档发票
InvoicesApi invoices_update_invoice PUT /api/v1/stores/{storeId}/invoices/{invoiceId} 更新发票
LightningInternalNodeApi internal_lightning_node_api_connect_to_node POST /api/v1/server/lightning/{cryptoCode}/connect 连接到闪电节点
LightningInternalNodeApi internal_lightning_node_api_create_invoice POST /api/v1/server/lightning/{cryptoCode}/invoices 创建闪电发票
LightningInternalNodeApi internal_lightning_node_api_get_balance GET /api/v1/server/lightning/{cryptoCode}/balance 获取节点余额
LightningInternalNodeApi internal_lightning_node_api_get_channels GET /api/v1/server/lightning/{cryptoCode}/channels 获取通道
LightningInternalNodeApi internal_lightning_node_api_get_deposit_address POST /api/v1/server/lightning/{cryptoCode}/address 获取存款地址
LightningInternalNodeApi internal_lightning_node_api_get_info GET /api/v1/server/lightning/{cryptoCode}/info 获取节点信息
LightningInternalNodeApi internal_lightning_node_api_get_invoice GET /api/v1/server/lightning/{cryptoCode}/invoices/{id} 获取发票
LightningInternalNodeApi internal_lightning_node_api_get_payment GET /api/v1/server/lightning/{cryptoCode}/payments/{paymentHash} 获取支付
LightningInternalNodeApi internal_lightning_node_api_open_channel POST /api/v1/server/lightning/{cryptoCode}/channels 开启通道
LightningInternalNodeApi internal_lightning_node_api_pay_invoice POST /api/v1/server/lightning/{cryptoCode}/invoices/pay 支付闪电发票
LightningStoreApi store_lightning_node_api_connect_to_node POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/connect 连接到闪电节点
LightningStoreApi store_lightning_node_api_create_invoice POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices 创建闪电发票
LightningStoreApi store_lightning_node_api_get_balance GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/balance 获取节点余额
LightningStoreApi store_lightning_node_api_get_channels GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels 获取通道
LightningStoreApi store_lightning_node_api_get_deposit_address POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/address 获取存款地址
LightningStoreApi store_lightning_node_api_get_info GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/info 获取节点信息
LightningStoreApi store_lightning_node_api_get_invoice GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/{id} 获取发票
LightningStoreApi store_lightning_node_api_get_payment GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/payments/{paymentHash} 获取支付
LightningStoreApi store_lightning_node_api_open_channel POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels 开启通道
LightningStoreApi store_lightning_node_api_pay_invoice POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay 支付闪电发票
MiscellaneousApi invoice_checkout GET /i/{invoiceId} 发票结账
MiscellaneousApi lang_codes GET /misc/lang 语言代码
MiscellaneousApi permissions_metadata GET /misc/permissions 权限元数据
NotificationsCurrentUserApi notifications_delete_notification DELETE /api/v1/users/me/notifications/{id} 删除通知
NotificationsCurrentUserApi notifications_get_notification GET /api/v1/users/me/notifications/{id} 获取通知
NotificationsCurrentUserApi notifications_get_notifications GET /api/v1/users/me/notifications 获取通知
NotificationsCurrentUserApi notifications_update_notification PUT /api/v1/users/me/notifications/{id} 更新通知
PaymentRequestsApi payment_requests_archive_payment_request DELETE /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} 归档支付请求
PaymentRequestsApi payment_requests_create_payment_request POST /api/v1/stores/{storeId}/payment-requests 创建新的支付请求
PaymentRequestsApi payment_requests_get_payment_request GET /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} 获取支付请求
PaymentRequestsApi payment_requests_get_payment_requests GET /api/v1/stores/{storeId}/payment-requests 获取支付请求列表
PaymentRequestsApi payment_requests_update_payment_request PUT /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} 更新支付请求
PayoutProcessorsApi payout_processors_get_payout_processors GET /api/v1/payout-processors 获取支付处理器
PullPaymentsManagementApi pull_payments_archive_pull_payment DELETE /api/v1/stores/{storeId}/pull-payments/{pullPaymentId} 归档拉取支付
PullPaymentsManagementApi pull_payments_create_pull_payment POST /api/v1/stores/{storeId}/pull-payments 创建新的拉取支付
PullPaymentsManagementApi pull_payments_get_pull_payments GET /api/v1/stores/{storeId}/pull-payments 获取店铺的拉取支付
PullPaymentsPayoutPublicApi pull_payments_get_payout GET /api/v1/pull-payments/{pullPaymentId}/payouts/{payoutId} 获取支付
PullPaymentsPublicApi pull_payments_create_payout POST /api/v1/pull-payments/{pullPaymentId}/payouts 创建支付
PullPaymentsPublicApi pull_payments_get_payout GET /api/v1/pull-payments/{pullPaymentId}/payouts/{payoutId} 获取支付
PullPaymentsPublicApi pull_payments_get_payouts GET /api/v1/pull-payments/{pullPaymentId}/payouts 获取支付
PullPaymentsPublicApi pull_payments_get_pull_payment GET /api/v1/pull-payments/{pullPaymentId} 获取拉取支付
ServerInfoApi server_info_get_server_info GET /api/v1/server/info 获取服务器信息
StorePaymentMethodsApi store_payment_methods_get_store_payment_methods GET /api/v1/stores/{storeId}/payment-methods 获取店铺支付方式
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_delete_lnurl_pay_payment_method DELETE /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} 删除店铺 LNURL Pay 支付方式
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_get_lnurl_pay_payment_method GET /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} 获取店铺 LNURL Pay 支付方式
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_get_lnurl_pay_payment_methods GET /api/v1/stores/{storeId}/payment-methods/LNURL 获取店铺 LNURL 支付方式
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_update_lnurl_pay_payment_method PUT /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} 更新店铺 LNURL Pay 支付方式
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_delete_lightning_network_payment_method DELETE /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} 删除店铺 Lightning Network 支付方式
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_get_lightning_network_payment_method GET /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} 获取店铺 Lightning Network 支付方式
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_get_lightning_network_payment_methods GET /api/v1/stores/{storeId}/payment-methods/LightningNetwork 获取店铺 Lightning Network 支付方式
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_update_lightning_network_payment_method PUT /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} 更新店铺 Lightning Network 支付方式
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_delete_on_chain_payment_method DELETE /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} 删除店铺链上支付方式
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_generate_on_chain_wallet POST /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/generate 生成链上钱包
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_get_on_chain_payment_method GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} 获取链上支付方式
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_get_on_chain_payment_method_preview GET /api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview 预览链上支付方式地址
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_get_on_chain_payment_methods GET /api/v1/stores/{storeId}/payment-methods/OnChain 获取链上支付方式
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_poston_chain_payment_method_preview POST /api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview 预览提议的链上支付方式地址
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_update_on_chain_payment_method PUT /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} 更新链上支付方式
StoreWalletOnChainApi store_on_chain_wallets_create_on_chain_transaction POST /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions 创建链上钱包交易
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_fee_rate GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/feerate 获取链上钱包费率
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_wallet_receive_address GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/address 获取链上钱包地址
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_wallet_transaction GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions/{transactionId} 获取链上钱包交易
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_wallet_utxos GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/utxos 获取链上钱包UTXOS
StoreWalletOnChainApi store_on_chain_wallets_patch_on_chain_wallet_transaction PATCH /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions/{transactionId} 修补链上钱包交易信息
StoreWalletOnChainApi store_on_chain_wallets_show_on_chain_wallet_overview GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet 获取链上钱包概览
StoreWalletOnChainApi store_on_chain_wallets_show_on_chain_wallet_transactions GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions 获取链上钱包交易
StoreWalletOnChainApi store_on_chain_wallets_un_reserve_on_chain_wallet_receive_address DELETE /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/address 取消预留最后链上钱包地址
StoresApi stores_create_store POST /api/v1/stores 创建新的店铺
StoresApi stores_delete_store DELETE /api/v1/stores/{storeId} 删除店铺
StoresApi stores_get_store GET /api/v1/stores/{storeId} 获取店铺
StoresApi stores_get_stores GET /api/v1/stores 获取店铺列表
StoresApi stores_update_store PUT /api/v1/stores/{storeId} 更新店铺
StoresEmailApi stores_get_store_email_settings GET /api/v1/stores/{storeId}/email 获取店铺电子邮件设置
StoresEmailApi stores_send_store_email POST /api/v1/stores/{storeId}/email/send 发送店铺电子邮件
StoresEmailApi stores_update_store_email_settings PUT /api/v1/stores/{storeId}/email 更新店铺电子邮件设置
StoresPayoutProcessorsApi greenfield_store_automated_lightning_payout_processors_controller_get_store_lightning_automated_payout_processors_for_payment_method GET /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory/{paymentMethod} 获取配置的店铺闪电自动化支付处理器
StoresPayoutProcessorsApi greenfield_store_automated_lightning_payout_processors_controller_get_store_lightning_automated_transfer_sender_factory GET /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory 获取配置的店铺闪电自动化支付处理器
StoresPayoutProcessorsApi greenfield_store_automated_lightning_payout_processors_controller_update_store_lightning_automated_payout_processor PUT /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory/{paymentMethod} 更新配置的店铺闪电自动化支付处理器
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_get_store_on_chain_automated_payout_processors_for_payment_method GET /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory/{paymentMethod} 获取配置的店铺链上自动化支付处理器
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_get_store_on_chain_automated_transfer_sender_factory GET /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory 获取配置的店铺链上自动化支付处理器
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_update_store_on_chain_automated_payout_processor_for_payment_method PUT /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory/{paymentMethod} 更新配置的链上自动付款处理器
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_update_store_on_chain_automated_transfer_sender_factory PUT /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory 更新配置的链上自动付款处理器
StoresPayoutProcessorsApi store_payout_processors_get_store_payout_processors GET /api/v1/stores/{storeId}/payout-processors 获取商店配置的付款处理器
StoresPayoutProcessorsApi store_payout_processors_remove_store_payout_processor DELETE /api/v1/stores/{storeId}/payout-processors/{processor}/{paymentMethod} 移除商店配置的付款处理器
StoresPayoutsApi payouts_create_payout_through_store POST /api/v1/stores/{storeId}/payouts 创建支付
StoresPayoutsApi pull_payments_approve_payout POST /api/v1/stores/{storeId}/payouts/{payoutId} 批准付款
StoresPayoutsApi pull_payments_cancel_payout DELETE /api/v1/stores/{storeId}/payouts/{payoutId} 取消付款
StoresPayoutsApi pull_payments_get_store_payouts GET /api/v1/stores/{storeId}/payouts 获取商店付款
StoresPayoutsApi pull_payments_mark_payout_paid POST /api/v1/stores/{storeId}/payouts/{payoutId}/mark-paid 标记付款为已付款
StoresUsersApi stores_add_store_user POST /api/v1/stores/{storeId}/users 添加商店用户
StoresUsersApi stores_get_store_users GET /api/v1/stores/{storeId}/users 获取商店用户
StoresUsersApi stores_remove_store_user DELETE /api/v1/stores/{storeId}/users/{userId} 移除商店用户
UsersApi users_create_user POST /api/v1/users 创建用户
UsersApi users_delete_current_user DELETE /api/v1/users/me 删除用户资料
UsersApi users_delete_user DELETE /api/v1/users/{idOrEmail} 删除用户
UsersApi users_get_current_user GET /api/v1/users/me 获取当前用户信息
UsersApi users_get_user GET /api/v1/users/{idOrEmail} 通过ID或邮箱获取用户
UsersApi users_get_users GET /api/v1/users 获取所有用户
UsersApi users_toggle_user_lock DELETE /api/v1/users/{idOrEmail}/lock 切换用户
WebhooksApi webhooks_create_webhook POST /api/v1/stores/{storeId}/webhooks 创建一个新的webhook
WebhooksApi webhooks_delete_webhook DELETE /api/v1/stores/{storeId}/webhooks/{webhookId} 删除一个webhook
WebhooksApi webhooks_get_webhook GET /api/v1/stores/{storeId}/webhooks/{webhookId} 获取商店的webhook
WebhooksApi webhooks_get_webhook_deliveries GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries 获取最新交付
WebhooksApi webhooks_get_webhook_delivery GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId} 获取一个webhook交付
WebhooksApi webhooks_get_webhook_delivery_requests GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request 获取交付的请求
WebhooksApi webhooks_get_webhooks GET /api/v1/stores/{storeId}/webhooks 获取商店的webhooks
WebhooksApi webhooks_redeliver_webhook_delivery POST /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver 重新交付
WebhooksApi webhooks_update_webhook PUT /api/v1/stores/{storeId}/webhooks/{webhookId} 更新webhook

模型文档

要获取crate生成的文档,请使用

cargo doc --open

作者

依赖

~4–18MB
~237K SLoC