#user #account #zoom #set #api-client #information

zoom-api

为Zoom API提供的完整生成和有偏见的API客户端

17个不稳定版本 (4个破坏性版本)

0.7.0 2023年7月19日
0.4.0 2023年3月31日
0.3.1 2022年11月18日
0.2.8 2022年7月26日
0.1.2 2020年7月10日

#312 in 视频

Download history 12/week @ 2024-04-23 188/week @ 2024-04-30 14/week @ 2024-05-07 29/week @ 2024-05-14 8/week @ 2024-05-21 20/week @ 2024-05-28 8/week @ 2024-06-04 11/week @ 2024-06-11 10/week @ 2024-06-18 23/week @ 2024-06-25 189/week @ 2024-07-02 16/week @ 2024-07-09 12/week @ 2024-07-16 22/week @ 2024-07-23 181/week @ 2024-07-30 49/week @ 2024-08-06

每月268次下载

MIT许可证

2MB
39K SLoC

zoom-api

为Zoom提供的完整生成、有偏见的API客户端库。

docs.rs

API详细信息

Zoom API允许开发者访问Zoom的信息。您可以使用此API在Zoom应用市场上构建私有服务或公共应用程序。要了解如何获取凭据并创建私有/公共应用程序,请阅读我们的授权指南。所有端点均通过https提供,位于api.zoom.us/v2/

例如,您可以通过https://api.zoom.us/v2/users/列出账户上的所有用户。

API服务条款

联系

名称 网址 电子邮件
Zoom开发者 https://developer.zoom.us/ [email protected]

许可证

名称 网址
适用于OAS 2.0的MIT https://opensource.org/licenses/MIT

客户端详细信息

此客户端基于API规范版本2.0.0Zoom OpenAPI规范生成。这样,它将随着新功能的添加而保持最新。文档与代码一起生成,以便使此库易于使用。

要安装库,请在您的Cargo.toml文件中添加以下内容。

[dependencies]
zoom-api = "0.7.0"

基本示例

典型用法需要初始化一个Client。这需要一个用户代理字符串和一组凭据。

use zoom_api::Client;

let zoom = Client::new(
    String::from("client-id"),
    String::from("client-secret"),
    String::from("redirect-uri"),
    String::from("token"),
    String::from("refresh-token")
);

或者,库可以在环境中搜索客户端所需的大部分变量。

  • Zoom客户端ID
  • Zoom客户端密钥
  • Zoom重定向URI

然后您可以从环境中创建一个客户端。

use zoom_api::Client;

let zoom = Client::new_from_env(
    String::from("token"),
    String::from("refresh-token")
);

传递空值给tokenrefresh_token是可以的。在客户端的初始状态下,您将不知道这些值。

要启动一个新的客户端并获取tokenrefresh_token,请使用以下方法。

use zoom_api::Client;

async fn do_call() {
    let mut zoom = Client::new_from_env("", "");

    // Get the URL to request consent from the user.
    // You can optionally pass in scopes. If none are provided, then the
    // resulting URL will not have any scopes.
    let user_consent_url = zoom.user_consent_url(&["some-scope".to_string()]);

    // In your redirect URL capture the code sent and our state.
    // Send it along to the request for the token.
    let code = "thing-from-redirect-url";
    let state = "state-from-redirect-url";
    let mut access_token = zoom.get_access_token(code, state).await.unwrap();

    // You can additionally refresh the access token with the following.
    // You must have a refresh token to be able to call this function.
    access_token = zoom.refresh_access_token().await.unwrap();
}

依赖项

~16–32MB
~605K SLoC