#revolt #api-client #server #api-server #generate #chat #platform

revoltapi

开源以用户为中心的聊天平台

3个不稳定版本

0.6.5 2023年7月20日
0.5.5 2022年9月6日
0.5.5-rev.22022年10月25日
0.5.5-rev.12022年9月21日

#1123 in Web编程


用于 revolute

AGPL-3.0-or-later

760KB
14K SLoC

Rust API客户端用于revolt_api

开源以用户为中心的聊天平台。

更多信息请访问 https://revolt.chat

概述

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

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

安装

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

revolt_api = { path = "./revolt_api" }

API端点文档

所有URI相对于 https://api.revolt.chat

方法 HTTP请求 描述
AccountApi change_email_change_email PATCH /auth/account/change/email 更改电子邮件
AccountApi change_password_change_password PATCH /auth/account/change/password 更改密码
AccountApi confirm_deletion_confirm_deletion PUT /auth/account/delete 确认账户删除
AccountApi create_account_create_account POST /auth/account/create 创建账户
AccountApi delete_account_delete_account POST /auth/account/delete 删除账户
AccountApi disable_account_disable_account POST /auth/account/disable 禁用账户
AccountApi fetch_account_fetch_account GET /auth/account/ 获取账户
AccountApi password_reset_password_reset PATCH /auth/account/reset_password 重置密码
AccountApi resend_verification_resend_verification POST /auth/account/reverify 重新发送验证
AccountApi send_password_reset_send_password_reset POST /auth/account/reset_password 发送密码重置
AccountApi verify_email_verify_email POST /auth/account/verify/{code} 验证电子邮件
AdminApi message_query_message_query POST /admin/messages 全局获取消息
AdminApi stats_stats GET /admin/stats 查询统计数据
BotsApi 创建机器人 POST /bots/create 创建机器人
BotsApi 删除机器人 DELETE /bots/{target} 删除机器人
BotsApi 编辑机器人 PATCH /bots/{target} 编辑机器人
BotsApi 获取机器人 GET /bots/{bot} 获取机器人
BotsApi 获取所有机器人 GET /bots/@me 获取所有机器人
BotsApi 获取公共机器人 GET /bots/{target}/invite 获取公共机器人
BotsApi 邀请机器人 POST /bots/{target}/invite 邀请机器人
ChannelInformationApi channel_delete_req DELETE /channels/{target} 关闭频道
ChannelInformationApi channel_edit_req PATCH /channels/{target} 编辑频道
ChannelInformationApi channel_fetch_req GET /channels/{target} 获取频道
ChannelInvitesApi invite_create_req POST /channels/{target}/invites 创建邀请
ChannelPermissionsApi permissions_set_default_req PUT /channels/{target}/permissions/default 设置默认权限
ChannelPermissionsApi permissions_set_req PUT /channels/{target}/permissions/{role_id} 设置角色权限
CoreApi root_root GET / 查询节点
DirectMessagingApi fetch_dms_req GET /users/dms 获取直接消息频道
DirectMessagingApi open_dm_req GET /users/{target}/dm 打开直接消息
EmojisApi emoji_create_create_emoji PUT /custom/emoji/{id} 创建新表情
EmojisApi emoji_delete_delete_emoji DELETE /custom/emoji/{id} 删除表情
EmojisApi emoji_fetch_fetch_emoji GET /custom/emoji/{id} 获取表情
GroupsApi group_add_member_req PUT /channels/{target}/recipients/{member} 添加成员到组
GroupsApi group_create_req POST /channels/create 创建组
GroupsApi group_remove_member_req DELETE /channels/{target}/recipients/{member} 从组中移除成员
GroupsApi members_fetch_req GET /channels/{target}/members 获取组成员
InteractionsApi message_clear_reactions_clear_reactions DELETE /channels/{target}/messages/{msg}/reactions 从消息中移除所有反应
InteractionsApi message_react_react_message PUT /channels/{target}/messages/{msg}/reactions/{emoji} 向消息添加反应
InteractionsApi message_unreact_unreact_message DELETE /channels/{target}/messages/{msg}/reactions/{emoji} 从消息中移除反应
InvitesApi invite_delete_req DELETE /invites/{target} 删除邀请
InvitesApi invite_fetch_req GET /invites/{target} 获取邀请
InvitesApi invite_join_req POST /invites/{target} 加入邀请
MfaApi create_ticket_create_ticket PUT /auth/mfa/ticket 创建MFA票据
MfaApi fetch_recovery_fetch_recovery POST /auth/mfa/recovery 获取恢复码
MfaApi fetch_status_fetch_status GET /auth/mfa/ MFA状态
MfaApi generate_recovery_generate_recovery PATCH /auth/mfa/recovery 生成恢复码
MfaApi get_mfa_methods_get_mfa_methods GET /auth/mfa/methods 获取MFA方法
MfaApi totp_disable_totp_disable DELETE /auth/mfa/totp 禁用TOTP 2FA
MfaApi totp_enable_totp_enable PUT /auth/mfa/totp 启用TOTP 2FA
MfaApi totp_generate_secret_totp_generate_secret POST /auth/mfa/totp 生成TOTP密钥
MessagingApi channel_ack_req PUT /channels/{target}/ack/{message} 确认消息
MessagingApi message_bulk_delete_req DELETE /channels/{target}/messages/bulk 批量删除消息
MessagingApi message_delete_req DELETE /channels/{target}/messages/{msg} 删除消息
MessagingApi message_edit_req PATCH /channels/{target}/messages/{msg} 编辑消息
MessagingApi message_fetch_req GET /channels/{target}/messages/{msg} 获取消息
MessagingApi message_query_req GET /channels/{target}/messages 获取消息
MessagingApi message_query_stale_req POST /channels/{_target}/messages/stale 轮询消息更改
MessagingApi message_search_req POST /channels/{target}/search 搜索消息
MessagingApi message_send_message_send POST /channels/{target}/messages 发送消息
OnboardingApi complete_req POST /onboard/complete 完成注册
OnboardingApi hello_req GET /onboard/hello 检查注册状态
RelationshipsApi add_friend_req PUT /users/{target}/friend 接受好友请求
RelationshipsApi block_user_req PUT /users/{target}/block 封禁用户
RelationshipsApi find_mutual_req GET /users/{target}/mutual 获取共同好友和服务器
RelationshipsApi remove_friend_req DELETE /users/{target}/friend 拒绝好友请求/移除好友
RelationshipsApi send_friend_request_req POST /users/friend 发送好友请求
RelationshipsApi unblock_user_req DELETE /users/{target}/block 解除封禁
ServerCustomisationApi emoji_list_list_emoji GET /servers/{target}/emojis 获取服务器表情
ServerInformationApi channel_create_req POST /servers/{target}/channels 创建频道
ServerInformationApi server_ack_req PUT /servers/{target}/ack 标记服务器为已读
ServerInformationApi server_create_req POST /servers/create 创建服务器
ServerInformationApi server_delete_req DELETE /servers/{target} 删除/离开服务器
ServerInformationApi server_edit_req PATCH /servers/{target} 编辑服务器
ServerInformationApi server_fetch_req GET /servers/{target} 获取服务器
ServerMembersApi ban_create_req PUT /servers/{server}/bans/{target} 封禁用户
ServerMembersApi ban_list_req GET /servers/{target}/bans 获取封禁列表
ServerMembersApi ban_remove_req DELETE /servers/{server}/bans/{target} 解除封禁
ServerMembersApi invites_fetch_req GET /servers/{target}/invites 获取邀请
ServerMembersApi member_edit_req PATCH /servers/{server}/members/{target} 编辑成员
ServerMembersApi member_experimental_query_member_experimental_query GET /servers/{target}/members_experimental_query 按名称查询成员
ServerMembersApi member_fetch_all_req GET /servers/{target}/members 获取所有成员
ServerMembersApi member_fetch_req GET /servers/{target}/members/{member} 获取成员
ServerMembersApi member_remove_req DELETE /servers/{target}/members/{member} 踢出成员
ServerPermissionsApi permissions_set_default_req PUT /servers/{target}/permissions/default 设置默认权限
ServerPermissionsApi permissions_set_req PUT /servers/{target}/permissions/{role_id} 设置角色权限
ServerPermissionsApi roles_create_req POST /servers/{target}/roles 创建角色
ServerPermissionsApi roles_delete_req DELETE /servers/{target}/roles/{role_id} 删除角色
ServerPermissionsApi roles_edit_req PATCH /servers/{target}/roles/{role_id} 编辑角色
SessionApi edit_edit PATCH /auth/session/{id} 编辑会话
SessionApi fetch_all_fetch_all GET /auth/session/all 获取所有会话
SessionApi login_login POST /auth/session/login 登录
SessionApi logout_logout POST /auth/session/logout 登出
SessionApi revoke_all_revoke_all DELETE /auth/session/all 删除所有会话
SessionApi revoke_revoke DELETE /auth/session/{id} 撤销会话
SyncApi get_settings_req POST /sync/settings/fetch 获取设置
SyncApi get_unreads_req GET /sync/unreads 获取未读消息
SyncApi set_settings_req POST /sync/settings/set 设置设置
UserInformationApi change_username_req PATCH /users/@me/username 更改用户名
UserInformationApi edit_user_req PATCH /users/{target} 编辑用户
UserInformationApi fetch_profile_req GET /users/{target}/profile 获取用户资料
UserInformationApi fetch_self_req GET /users/@me 获取自身
UserInformationApi fetch_user_flags_fetch_user_flags GET /users/{target}/flags 获取用户标志
UserInformationApi fetch_user_req GET /users/{target} 获取用户
UserInformationApi 获取默认头像请求 GET /users/{目标}/default_avatar 获取默认头像
UserSafetyApi create_strike_create_strike POST /safety/strikes 创建处罚
UserSafetyApi delete_strike_delete_strike DELETE /safety/strikes/{strike_id} 删除处罚
UserSafetyApi edit_report_edit_report PATCH /safety/reports/{report} 编辑报告
UserSafetyApi edit_strike_edit_strike POST /safety/strikes/{strike_id} 编辑处罚
UserSafetyApi fetch_report_fetch_report GET /safety/report/{id} 获取报告
UserSafetyApi fetch_reports_fetch_reports GET /safety/reports 获取报告列表
UserSafetyApi fetch_snapshots_fetch_snapshots GET /safety/snapshot/{report_id} 获取快照
UserSafetyApi fetch_strikes_fetch_strikes GET /safety/strikes/{user_id} 获取处罚列表
UserSafetyApi report_content_report_content POST /safety/report 报告内容
VoiceApi voice_join_req POST /channels/{target}/join_call 加入通话
WebPushApi subscribe_req POST /push/subscribe 推送订阅
WebPushApi unsubscribe_req POST /push/unsubscribe 取消订阅
WebhooksApi webhook_create_req POST /channels/{target}/webhooks 创建webhook
WebhooksApi webhook_fetch_all_req GET /channels/{channel_id}/webhooks 获取所有webhook

模型文档

要获取对crate生成的文档的访问权限,请使用

cargo doc --open

作者

[email protected]

依赖关系

~4–19MB
~262K SLoC