Skip to main content

zoom_api/
webinars.rs

1use crate::Client;
2use crate::ClientResult;
3
4pub struct Webinars {
5    pub client: Client,
6}
7
8impl Webinars {
9    #[doc(hidden)]
10    pub fn new(client: Client) -> Self {
11        Webinars { client }
12    }
13
14    /**
15     * List webinars.
16     *
17     * This function performs a `GET` to the `/users/{userId}/webinars` endpoint.
18     *
19     * Use this API to list all the webinars that are scheduled by or on-behalf a user (webinar host). For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter.
20     *
21     * Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing webinars. Webinars allow a host to broadcast a Zoom meeting to up to 10,000 attendees.
22     *
23     * **Scopes:** `webinar:read:admin`, `webinar:read`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
24     *
25     * **Prerequisites:**
26     * * Pro or higher plan with a Webinar Add-on.
27     *
28     * **Parameters:**
29     *
30     * * `user_id: &str` -- The user ID or email address of the user. For user-level apps, pass `me` as the value for userId.
31     * * `page_size: i64` -- The number of records returned within a single API call.
32     * * `page_number: i64` --
33     *   **Deprecated** - This field has been deprecated and we will stop supporting it completely in a future release. Please use "next_page_token" for pagination instead of this field.
34     *   
35     *   The page number of the current page in the returned records.
36     */
37    pub async fn get(
38        &self,
39        user_id: &str,
40        page_size: i64,
41        page_number: i64,
42    ) -> ClientResult<crate::Response<crate::types::Domains>> {
43        let mut query_args: Vec<(String, String)> = Default::default();
44        if page_number > 0 {
45            query_args.push(("page_number".to_string(), page_number.to_string()));
46        }
47        if page_size > 0 {
48            query_args.push(("page_size".to_string(), page_size.to_string()));
49        }
50        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
51        let url = self.client.url(
52            &format!(
53                "/users/{}/webinars?{}",
54                crate::progenitor_support::encode_path(user_id),
55                query_
56            ),
57            None,
58        );
59        self.client
60            .get(
61                &url,
62                crate::Message {
63                    body: None,
64                    content_type: None,
65                },
66            )
67            .await
68    }
69    /**
70     * Create a webinar.
71     *
72     * This function performs a `POST` to the `/users/{userId}/webinars` endpoint.
73     *
74     * Use this API to schedule a webinar for a user (host). For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter.
75     *
76     * Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing webinars. Webinars allow a host to broadcast a Zoom meeting to up to 10,000 attendees.
77     *
78     * **Scopes:** `webinar:write:admin`, `webinar:write`</br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
79     *
80     * **Prerequisites:**
81     * * Pro or higher plan with a Webinar add-on.
82     *
83     * **Parameters:**
84     *
85     * * `user_id: &str` -- The user ID or email address of the user. For user-level apps, pass `me` as the value for userId.
86     */
87    pub async fn create(
88        &self,
89        user_id: &str,
90    ) -> ClientResult<crate::Response<crate::types::WebinarCreateResponseAllOf>> {
91        let url = self.client.url(
92            &format!(
93                "/users/{}/webinars",
94                crate::progenitor_support::encode_path(user_id),
95            ),
96            None,
97        );
98        self.client
99            .post(
100                &url,
101                crate::Message {
102                    body: None,
103                    content_type: Some("application/json".to_string()),
104                },
105            )
106            .await
107    }
108    /**
109     * Get a webinar.
110     *
111     * This function performs a `GET` to the `/webinars/{webinarId}` endpoint.
112     *
113     * Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing Webinars. Webinar allows a host to broadcast a Zoom meeting to up to 10,000 attendees.<br>Use this API to get details of a scheduled webinar.<br><br>
114     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
115     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>**Prerequisites:**
116     * * Pro or higher plan with a Webinar Add-on.
117     *
118     * **Parameters:**
119     *
120     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
121     * * `occurrence_id: &str` -- Unique Identifier that identifies an occurrence of a recurring webinar. [Recurring webinars](https://support.zoom.us/hc/en-us/articles/216354763-How-to-Schedule-A-Recurring-Webinar) can have a maximum of 50 occurrences. When you create a recurring Webinar using [Create a Webinar API](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarcreate), you can retrieve the Occurrence ID from the response of the API call.
122     * * `show_previous_occurrences: bool` -- Enable/disable the option for a sub account to use shared [Virtual Room Connector(s)](https://support.zoom.us/hc/en-us/articles/202134758-Getting-Started-With-Virtual-Room-Connector) that are set up by the master account. Virtual Room Connectors can only be used by On-prem users.
123     */
124    pub async fn webinar(
125        &self,
126        webinar_id: i64,
127        occurrence_id: &str,
128        show_previous_occurrences: bool,
129    ) -> ClientResult<crate::Response<crate::types::WebinarResponseAllOf>> {
130        let mut query_args: Vec<(String, String)> = Default::default();
131        if !occurrence_id.is_empty() {
132            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
133        }
134        if show_previous_occurrences {
135            query_args.push((
136                "show_previous_occurrences".to_string(),
137                show_previous_occurrences.to_string(),
138            ));
139        }
140        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
141        let url = self.client.url(
142            &format!(
143                "/webinars/{}?{}",
144                crate::progenitor_support::encode_path(&webinar_id.to_string()),
145                query_
146            ),
147            None,
148        );
149        self.client
150            .get(
151                &url,
152                crate::Message {
153                    body: None,
154                    content_type: None,
155                },
156            )
157            .await
158    }
159    /**
160     * Delete a webinar.
161     *
162     * This function performs a `DELETE` to the `/webinars/{webinarId}` endpoint.
163     *
164     * Delete a Webinar.<br><br>
165     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
166     *  
167     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
168     * **Prerequisites:**<br>
169     * * Pro or higher plan with a Webinar Add-on.
170     *
171     * **Parameters:**
172     *
173     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
174     * * `occurrence_id: &str` -- The meeting occurrence ID.
175     * * `cancel_webinar_reminder: &str` -- `true`: Notify panelists and registrants about the webinar cancellation via email.
176     *   
177     *   `false`: Do not send any email notification to webinar registrants and panelists.
178     *   
179     *   The default value of this field is `false`.
180     */
181    pub async fn delete(
182        &self,
183        webinar_id: i64,
184        occurrence_id: &str,
185        cancel_webinar_reminder: &str,
186    ) -> ClientResult<crate::Response<()>> {
187        let mut query_args: Vec<(String, String)> = Default::default();
188        if !cancel_webinar_reminder.is_empty() {
189            query_args.push((
190                "cancel_webinar_reminder".to_string(),
191                cancel_webinar_reminder.to_string(),
192            ));
193        }
194        if !occurrence_id.is_empty() {
195            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
196        }
197        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
198        let url = self.client.url(
199            &format!(
200                "/webinars/{}?{}",
201                crate::progenitor_support::encode_path(&webinar_id.to_string()),
202                query_
203            ),
204            None,
205        );
206        self.client
207            .delete(
208                &url,
209                crate::Message {
210                    body: None,
211                    content_type: None,
212                },
213            )
214            .await
215    }
216    /**
217     * Update a webinar.
218     *
219     * This function performs a `PATCH` to the `/webinars/{webinarId}` endpoint.
220     *
221     * Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing Webinars. Webinar allows a host to broadcast a Zoom meeting to up to 10,000 attendees.<br>
222     * Use this API to make updates to a scheduled Webinar.<br><br>
223     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
224     *  
225     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
226     * **Prerequisites:**<br>
227     * * Pro or higher plan with a Webinar Add-on.
228     *
229     * **Parameters:**
230     *
231     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
232     * * `occurrence_id: &str` -- Webinar occurrence id. Support change of agenda, start_time, duration, settings: {host_video, panelist_video, hd_video, watermark, auto_recording}.
233     */
234    pub async fn update(
235        &self,
236        webinar_id: i64,
237        occurrence_id: &str,
238    ) -> ClientResult<crate::Response<()>> {
239        let mut query_args: Vec<(String, String)> = Default::default();
240        if !occurrence_id.is_empty() {
241            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
242        }
243        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
244        let url = self.client.url(
245            &format!(
246                "/webinars/{}?{}",
247                crate::progenitor_support::encode_path(&webinar_id.to_string()),
248                query_
249            ),
250            None,
251        );
252        self.client
253            .patch(
254                &url,
255                crate::Message {
256                    body: None,
257                    content_type: Some("application/json".to_string()),
258                },
259            )
260            .await
261    }
262    /**
263     * List webinar participants.
264     *
265     * This function performs a `GET` to the `/past_webinars/{webinarId}/participants` endpoint.
266     *
267     * Use this API to list all the participants who attended a webinar hosted in the past. <br>
268     *
269     * **Prerequisites:**
270     * * Pro or higher plan with a Webinar Add-on.<br>
271     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
272     * <br>
273     * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
274     *
275     *
276     *
277     *
278     *
279     * **Parameters:**
280     *
281     * * `webinar_id: &str` -- Unique identifier of the webinar. You can retrieve the value of this field by calling the [list webinars](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinars) API.
282     * * `page_size: i64` -- The number of records returned within a single API call.
283     * * `next_page_token: &str` -- The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
284     */
285    pub async fn list_participants(
286        &self,
287        webinar_id: &str,
288        page_size: i64,
289        next_page_token: &str,
290    ) -> ClientResult<crate::Response<Vec<crate::types::Participants>>> {
291        let mut query_args: Vec<(String, String)> = Default::default();
292        if !next_page_token.is_empty() {
293            query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
294        }
295        if page_size > 0 {
296            query_args.push(("page_size".to_string(), page_size.to_string()));
297        }
298        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
299        let url = self.client.url(
300            &format!(
301                "/past_webinars/{}/participants?{}",
302                crate::progenitor_support::encode_path(webinar_id),
303                query_
304            ),
305            None,
306        );
307        let resp: crate::Response<crate::types::ListWebinarParticipantsResponse> = self
308            .client
309            .get(
310                &url,
311                crate::Message {
312                    body: None,
313                    content_type: None,
314                },
315            )
316            .await?;
317
318        // Return our response data.
319        Ok(crate::Response::new(
320            resp.status,
321            resp.headers,
322            resp.body.participants.to_vec(),
323        ))
324    }
325    /**
326     * List webinar participants.
327     *
328     * This function performs a `GET` to the `/past_webinars/{webinarId}/participants` endpoint.
329     *
330     * As opposed to `list_participants`, this function returns all the pages of the request at once.
331     *
332     * Use this API to list all the participants who attended a webinar hosted in the past. <br>
333     *
334     * **Prerequisites:**
335     * * Pro or higher plan with a Webinar Add-on.<br>
336     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
337     * <br>
338     * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
339     *
340     *
341     *
342     *
343     */
344    pub async fn list_all_participants(
345        &self,
346        webinar_id: &str,
347    ) -> ClientResult<crate::Response<Vec<crate::types::Participants>>> {
348        let url = self.client.url(
349            &format!(
350                "/past_webinars/{}/participants",
351                crate::progenitor_support::encode_path(webinar_id),
352            ),
353            None,
354        );
355        let crate::Response::<crate::types::ListWebinarParticipantsResponse> {
356            mut status,
357            mut headers,
358            mut body,
359        } = self
360            .client
361            .get(
362                &url,
363                crate::Message {
364                    body: None,
365                    content_type: None,
366                },
367            )
368            .await?;
369
370        let mut participants = body.participants;
371        let mut page = body.next_page_token;
372
373        // Paginate if we should.
374        while !page.is_empty() {
375            // Check if we already have URL params and need to concat the token.
376            if !url.contains('?') {
377                crate::Response::<crate::types::ListWebinarParticipantsResponse> {
378                    status,
379                    headers,
380                    body,
381                } = self
382                    .client
383                    .get(
384                        &format!("{}?next_page_token={}", url, page),
385                        crate::Message {
386                            body: None,
387                            content_type: None,
388                        },
389                    )
390                    .await?;
391            } else {
392                crate::Response::<crate::types::ListWebinarParticipantsResponse> {
393                    status,
394                    headers,
395                    body,
396                } = self
397                    .client
398                    .get(
399                        &format!("{}&next_page_token={}", url, page),
400                        crate::Message {
401                            body: None,
402                            content_type: None,
403                        },
404                    )
405                    .await?;
406            }
407
408            participants.append(&mut body.participants);
409
410            if !body.next_page_token.is_empty() && body.next_page_token != page {
411                page = body.next_page_token.to_string();
412            } else {
413                page = "".to_string();
414            }
415        }
416
417        // Return our response data.
418        Ok(crate::Response::new(status, headers, participants))
419    }
420    /**
421     * Update webinar status.
422     *
423     * This function performs a `PUT` to the `/webinars/{webinarId}/status` endpoint.
424     *
425     * Update a webinar's status. Use this API to end an ongoing webinar.<br><br>
426     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
427     *  
428     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
429     * **Prerequisites:**<br>
430     * * The account must hold a valid [Webinar plan](https://zoom.us/webinar).
431     *
432     * **Parameters:**
433     *
434     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
435     */
436    pub async fn status(
437        &self,
438        webinar_id: i64,
439        body: &crate::types::WebinarStatusRequest,
440    ) -> ClientResult<crate::Response<()>> {
441        let url = self.client.url(
442            &format!(
443                "/webinars/{}/status",
444                crate::progenitor_support::encode_path(&webinar_id.to_string()),
445            ),
446            None,
447        );
448        self.client
449            .put(
450                &url,
451                crate::Message {
452                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
453                    content_type: Some("application/json".to_string()),
454                },
455            )
456            .await
457    }
458    /**
459     * List panelists.
460     *
461     * This function performs a `GET` to the `/webinars/{webinarId}/panelists` endpoint.
462     *
463     * Panelists in a Webinar can view and send video, screen share, annotate, etc and do much more compared to attendees in a Webinar.
464     *
465     * Use this API to list all the panelists of a Webinar.<br><br>
466     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
467     *  
468     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
469     * **Prerequisites:**<br>
470     * * Pro or a higher plan with [Webinar Add-on](https://zoom.us/webinar).<br>
471     *
472     * **Parameters:**
473     *
474     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
475     */
476    pub async fn panelist(
477        &self,
478        webinar_id: i64,
479    ) -> ClientResult<crate::Response<crate::types::Domains>> {
480        let url = self.client.url(
481            &format!(
482                "/webinars/{}/panelists",
483                crate::progenitor_support::encode_path(&webinar_id.to_string()),
484            ),
485            None,
486        );
487        self.client
488            .get(
489                &url,
490                crate::Message {
491                    body: None,
492                    content_type: None,
493                },
494            )
495            .await
496    }
497    /**
498     * Add panelists.
499     *
500     * This function performs a `POST` to the `/webinars/{webinarId}/panelists` endpoint.
501     *
502     * Panelists in a Webinar can view and send video, screen share, annotate, etc and do much more compared to attendees in a webinar.<br>Use this API to [add panelists](https://support.zoom.us/hc/en-us/articles/115005657826-Inviting-Panelists-to-a-Webinar#h_7550d59e-23f5-4703-9e22-e76bded1ed70) to a scheduled webinar.<br><br>
503     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
504     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
505     *
506     *
507     * **Prerequisites:**
508     * * Pro or a higher plan with [Webinar Add-on](https://zoom.us/webinar).<br>
509     *
510     * **Parameters:**
511     *
512     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
513     */
514    pub async fn panelist_create(
515        &self,
516        webinar_id: i64,
517        body: &crate::types::WebinarPanelist,
518    ) -> ClientResult<crate::Response<()>> {
519        let url = self.client.url(
520            &format!(
521                "/webinars/{}/panelists",
522                crate::progenitor_support::encode_path(&webinar_id.to_string()),
523            ),
524            None,
525        );
526        self.client
527            .post(
528                &url,
529                crate::Message {
530                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
531                    content_type: Some("application/json".to_string()),
532                },
533            )
534            .await
535    }
536    /**
537     * Remove panelists.
538     *
539     * This function performs a `DELETE` to the `/webinars/{webinarId}/panelists` endpoint.
540     *
541     * Remove all the panelists from a Webinar.<br>
542     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
543     *  
544     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
545     * **Prerequisites:**<br>
546     * * Pro or a higher plan with [Webinar Add-on](https://zoom.us/webinar).<br>
547     *
548     * **Parameters:**
549     *
550     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
551     */
552    pub async fn panelists_delete(&self, webinar_id: i64) -> ClientResult<crate::Response<()>> {
553        let url = self.client.url(
554            &format!(
555                "/webinars/{}/panelists",
556                crate::progenitor_support::encode_path(&webinar_id.to_string()),
557            ),
558            None,
559        );
560        self.client
561            .delete(
562                &url,
563                crate::Message {
564                    body: None,
565                    content_type: None,
566                },
567            )
568            .await
569    }
570    /**
571     * Remove a panelist.
572     *
573     * This function performs a `DELETE` to the `/webinars/{webinarId}/panelists/{panelistId}` endpoint.
574     *
575     * [Remove](https://support.zoom.us/hc/en-us/articles/115005657826-Inviting-Panelists-to-a-Webinar#h_de31f237-a91c-4fb2-912b-ecfba8ec5ffb) a single panelist from a webinar.<br> You can retrieve the `panelistId` by calling **List Panelists API**.<br><br>
576     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
577     *  
578     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
579     *
580     *
581     * **Prerequisites:**<br>
582     * * Pro or a higher plan with [Webinar Add-on](https://zoom.us/webinar).<br>
583     *
584     * **Parameters:**
585     *
586     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
587     * * `panelist_id: i64` -- The panelist ID or panelist email.
588     */
589    pub async fn panelist_delete(
590        &self,
591        webinar_id: i64,
592        panelist_id: i64,
593    ) -> ClientResult<crate::Response<()>> {
594        let url = self.client.url(
595            &format!(
596                "/webinars/{}/panelists/{}",
597                crate::progenitor_support::encode_path(&webinar_id.to_string()),
598                crate::progenitor_support::encode_path(&panelist_id.to_string()),
599            ),
600            None,
601        );
602        self.client
603            .delete(
604                &url,
605                crate::Message {
606                    body: None,
607                    content_type: None,
608                },
609            )
610            .await
611    }
612    /**
613     * List webinar registrants.
614     *
615     * This function performs a `GET` to the `/webinars/{webinarId}/registrants` endpoint.
616     *
617     * Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing Webinars. Webinar allows a host to broadcast a Zoom meeting to up to 10,000 attendees. Scheduling a [Webinar with registration](https://support.zoom.us/hc/en-us/articles/204619915-Scheduling-a-Webinar-with-Registration) requires your registrants to complete a brief form before receiving the link to join the Webinar.<br>
618     * Use this API to list all the users that have registered for a webinar.<br><br>
619     * **Prerequisites:**
620     * * Pro or higher plan with a Webinar Add-on.<br>
621     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
622     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
623     *
624     *
625     *
626     * **Parameters:**
627     *
628     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
629     * * `occurrence_id: &str` -- The meeting occurrence ID.
630     * * `status: crate::types::MeetingRegistrantsStatus` -- The registrant status:<br>`pending` - Registrant's status is pending.<br>`approved` - Registrant's status is approved.<br>`denied` - Registrant's status is denied.
631     * * `tracking_source_id: &str` -- The tracking source ID for the registrants. Useful if you share the webinar registration page in multiple locations. See [Creating source tracking links for webinar registration](https://support.zoom.us/hc/en-us/articles/360000315683-Creating-source-tracking-links-for-webinar-registration) for details.
632     * * `page_size: i64` -- The number of records returned within a single API call.
633     * * `page_number: i64` --
634     *   **Deprecated** - This field has been deprecated and we will stop supporting it completely in a future release. Please use "next_page_token" for pagination instead of this field.
635     *   
636     *   The page number of the current page in the returned records.
637     * * `next_page_token: &str` -- The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
638     */
639    pub async fn registrant(
640        &self,
641        webinar_id: &str,
642        occurrence_id: &str,
643        status: crate::types::MeetingRegistrantsStatus,
644        tracking_source_id: &str,
645        page_size: i64,
646        page_number: i64,
647        next_page_token: &str,
648    ) -> ClientResult<crate::Response<crate::types::Domains>> {
649        let mut query_args: Vec<(String, String)> = Default::default();
650        if !next_page_token.is_empty() {
651            query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
652        }
653        if !occurrence_id.is_empty() {
654            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
655        }
656        if page_number > 0 {
657            query_args.push(("page_number".to_string(), page_number.to_string()));
658        }
659        if page_size > 0 {
660            query_args.push(("page_size".to_string(), page_size.to_string()));
661        }
662        if !status.to_string().is_empty() {
663            query_args.push(("status".to_string(), status.to_string()));
664        }
665        if !tracking_source_id.is_empty() {
666            query_args.push((
667                "tracking_source_id".to_string(),
668                tracking_source_id.to_string(),
669            ));
670        }
671        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
672        let url = self.client.url(
673            &format!(
674                "/webinars/{}/registrants?{}",
675                crate::progenitor_support::encode_path(webinar_id),
676                query_
677            ),
678            None,
679        );
680        self.client
681            .get(
682                &url,
683                crate::Message {
684                    body: None,
685                    content_type: None,
686                },
687            )
688            .await
689    }
690    /**
691     * Add a webinar registrant.
692     *
693     * This function performs a `POST` to the `/webinars/{webinarId}/registrants` endpoint.
694     *
695     * Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing Webinars. Webinar allows a host to broadcast a Zoom meeting to up to 10,000 attendees. Scheduling a [Webinar with registration](https://support.zoom.us/hc/en-us/articles/204619915-Scheduling-a-Webinar-with-Registration) requires your registrants to complete a brief form before receiving the link to join the Webinar.<br>Use this API to create and submit the registration of a user for a webinar.<br><br>
696     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
697     *  
698     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
699     * **Prerequisites:**
700     * * Pro or higher plan with a Webinar Add-on.
701     *
702     * **Parameters:**
703     *
704     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
705     * * `occurrence_ids: &str` -- Occurrence ID. Get this value from the webinar get API. Multiple values separated by a comma.
706     */
707    pub async fn registrant_create(
708        &self,
709        webinar_id: &str,
710        occurrence_ids: &str,
711    ) -> ClientResult<crate::Response<crate::types::WebinarRegistrantCreateResponse>> {
712        let mut query_args: Vec<(String, String)> = Default::default();
713        if !occurrence_ids.is_empty() {
714            query_args.push(("occurrence_ids".to_string(), occurrence_ids.to_string()));
715        }
716        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
717        let url = self.client.url(
718            &format!(
719                "/webinars/{}/registrants?{}",
720                crate::progenitor_support::encode_path(webinar_id),
721                query_
722            ),
723            None,
724        );
725        self.client
726            .post(
727                &url,
728                crate::Message {
729                    body: None,
730                    content_type: Some("application/json".to_string()),
731                },
732            )
733            .await
734    }
735    /**
736     * Perform batch registration.
737     *
738     * This function performs a `POST` to the `/webinars/{webinarId}/batch_registrants` endpoint.
739     *
740     * Use this API to register up to 30 registrants at once for a scheduled webinar that requires [registration](https://support.zoom.us/hc/en-us/articles/204619915-Scheduling-a-webinar-with-registration). <br>
741     *
742     * **Prerequisites:**<br>
743     * * The webinar host must be a Licensed user.
744     * * The webinar should be of type `5`, i.e., it should be a scheduled webinar. Other types of webinars are not supported by this API.<br><br>
745     * **Scope:** `webinar:write`, `webinar:write:admin`<br>
746     * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`<br>
747     *
748     *
749     *
750     *
751     *
752     *
753     *
754     *
755     *
756     * **Parameters:**
757     *
758     * * `webinar_id: &str` -- Unique identifier of the webinar.
759     */
760    pub async fn add_batch_registrants(
761        &self,
762        webinar_id: &str,
763        body: &crate::types::AddBatchRegistrantsRequest,
764    ) -> ClientResult<crate::Response<crate::types::AddBatchRegistrantsResponse>> {
765        let url = self.client.url(
766            &format!(
767                "/webinars/{}/batch_registrants",
768                crate::progenitor_support::encode_path(webinar_id),
769            ),
770            None,
771        );
772        self.client
773            .post(
774                &url,
775                crate::Message {
776                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
777                    content_type: Some("application/json".to_string()),
778                },
779            )
780            .await
781    }
782    /**
783     * Update registrant's status.
784     *
785     * This function performs a `PUT` to the `/webinars/{webinarId}/registrants/status` endpoint.
786     *
787     * Update a webinar registrant's status. Using this API, you can specify whether you want to approve a registration, deny a registration or cancel a previously approved registration.<br><br>
788     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
789     *  
790     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
791     *
792     *
793     *
794     * **Parameters:**
795     *
796     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
797     * * `occurrence_id: &str` -- The meeting occurrence ID.
798     */
799    pub async fn registrant_status(
800        &self,
801        webinar_id: i64,
802        occurrence_id: &str,
803        body: &crate::types::RegistrantStatus,
804    ) -> ClientResult<crate::Response<()>> {
805        let mut query_args: Vec<(String, String)> = Default::default();
806        if !occurrence_id.is_empty() {
807            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
808        }
809        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
810        let url = self.client.url(
811            &format!(
812                "/webinars/{}/registrants/status?{}",
813                crate::progenitor_support::encode_path(&webinar_id.to_string()),
814                query_
815            ),
816            None,
817        );
818        self.client
819            .put(
820                &url,
821                crate::Message {
822                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
823                    content_type: Some("application/json".to_string()),
824                },
825            )
826            .await
827    }
828    /**
829     * List past webinar instances.
830     *
831     * This function performs a `GET` to the `/past_webinars/{webinarId}/instances` endpoint.
832     *
833     * List past webinar instances.<br><br>
834     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
835     *
836     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
837     *
838     *
839     *
840     * **Parameters:**
841     *
842     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
843     */
844    pub async fn past(
845        &self,
846        webinar_id: i64,
847    ) -> ClientResult<crate::Response<crate::types::Domains>> {
848        let url = self.client.url(
849            &format!(
850                "/past_webinars/{}/instances",
851                crate::progenitor_support::encode_path(&webinar_id.to_string()),
852            ),
853            None,
854        );
855        self.client
856            .get(
857                &url,
858                crate::Message {
859                    body: None,
860                    content_type: None,
861                },
862            )
863            .await
864    }
865    /**
866     * List a webinar's polls .
867     *
868     * This function performs a `GET` to the `/webinars/{webinarId}/polls` endpoint.
869     *
870     * List all the [polls](https://support.zoom.us/hc/en-us/articles/203749865-Polling-for-Webinars) of a Webinar.<br><br>
871     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
872     *  
873     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
874     *
875     *
876     *
877     * **Parameters:**
878     *
879     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
880     */
881    pub async fn poll(
882        &self,
883        webinar_id: i64,
884    ) -> ClientResult<crate::Response<crate::types::Domains>> {
885        let url = self.client.url(
886            &format!(
887                "/webinars/{}/polls",
888                crate::progenitor_support::encode_path(&webinar_id.to_string()),
889            ),
890            None,
891        );
892        self.client
893            .get(
894                &url,
895                crate::Message {
896                    body: None,
897                    content_type: None,
898                },
899            )
900            .await
901    }
902    /**
903     * Create a webinar's poll.
904     *
905     * This function performs a `POST` to the `/webinars/{webinarId}/polls` endpoint.
906     *
907     * Create a [poll](https://support.zoom.us/hc/en-us/articles/203749865-Polling-for-Webinars) for a webinar.<br><br>
908     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
909     *  
910     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
911     *
912     *
913     *
914     * **Parameters:**
915     *
916     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
917     */
918    pub async fn poll_create(
919        &self,
920        webinar_id: i64,
921        body: &crate::types::Poll,
922    ) -> ClientResult<crate::Response<crate::types::MeetingPollGetResponseAllOf>> {
923        let url = self.client.url(
924            &format!(
925                "/webinars/{}/polls",
926                crate::progenitor_support::encode_path(&webinar_id.to_string()),
927            ),
928            None,
929        );
930        self.client
931            .post(
932                &url,
933                crate::Message {
934                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
935                    content_type: Some("application/json".to_string()),
936                },
937            )
938            .await
939    }
940    /**
941     * Get a webinar poll.
942     *
943     * This function performs a `GET` to the `/webinars/{webinarId}/polls/{pollId}` endpoint.
944     *
945     * Get a webinar's [poll](https://support.zoom.us/hc/en-us/articles/203749865-Polling-for-Webinars) details.<br><br>
946     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
947     *  
948     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
949     *
950     *
951     *
952     * **Parameters:**
953     *
954     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
955     * * `poll_id: &str` -- User's first name.
956     */
957    pub async fn poll_get(
958        &self,
959        webinar_id: i64,
960        poll_id: &str,
961    ) -> ClientResult<crate::Response<crate::types::MeetingPollGetResponseAllOf>> {
962        let url = self.client.url(
963            &format!(
964                "/webinars/{}/polls/{}",
965                crate::progenitor_support::encode_path(&webinar_id.to_string()),
966                crate::progenitor_support::encode_path(poll_id),
967            ),
968            None,
969        );
970        self.client
971            .get(
972                &url,
973                crate::Message {
974                    body: None,
975                    content_type: None,
976                },
977            )
978            .await
979    }
980    /**
981     * Update a webinar poll.
982     *
983     * This function performs a `PUT` to the `/webinars/{webinarId}/polls/{pollId}` endpoint.
984     *
985     * Update a webinar's [poll](https://support.zoom.us/hc/en-us/articles/203749865-Polling-for-Webinars).<br><br>
986     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
987     *  
988     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
989     *
990     *
991     *
992     * **Parameters:**
993     *
994     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
995     * * `poll_id: &str` -- User's first name.
996     */
997    pub async fn poll_update(
998        &self,
999        webinar_id: i64,
1000        poll_id: &str,
1001        body: &crate::types::Poll,
1002    ) -> ClientResult<crate::Response<()>> {
1003        let url = self.client.url(
1004            &format!(
1005                "/webinars/{}/polls/{}",
1006                crate::progenitor_support::encode_path(&webinar_id.to_string()),
1007                crate::progenitor_support::encode_path(poll_id),
1008            ),
1009            None,
1010        );
1011        self.client
1012            .put(
1013                &url,
1014                crate::Message {
1015                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
1016                    content_type: Some("application/json".to_string()),
1017                },
1018            )
1019            .await
1020    }
1021    /**
1022     * Delete a webinar poll.
1023     *
1024     * This function performs a `DELETE` to the `/webinars/{webinarId}/polls/{pollId}` endpoint.
1025     *
1026     * Delete a webinar's [poll](https://support.zoom.us/hc/en-us/articles/203749865-Polling-for-Webinars).<br><br>
1027     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
1028     *  
1029     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
1030     *
1031     *
1032     *
1033     * **Parameters:**
1034     *
1035     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1036     * * `poll_id: &str` -- User's first name.
1037     */
1038    pub async fn poll_delete(
1039        &self,
1040        webinar_id: i64,
1041        poll_id: &str,
1042    ) -> ClientResult<crate::Response<()>> {
1043        let url = self.client.url(
1044            &format!(
1045                "/webinars/{}/polls/{}",
1046                crate::progenitor_support::encode_path(&webinar_id.to_string()),
1047                crate::progenitor_support::encode_path(poll_id),
1048            ),
1049            None,
1050        );
1051        self.client
1052            .delete(
1053                &url,
1054                crate::Message {
1055                    body: None,
1056                    content_type: None,
1057                },
1058            )
1059            .await
1060    }
1061    /**
1062     * List registration questions.
1063     *
1064     * This function performs a `GET` to the `/webinars/{webinarId}/registrants/questions` endpoint.
1065     *
1066     * Scheduling a [Webinar with registration](https://support.zoom.us/hc/en-us/articles/204619915-Scheduling-a-Webinar-with-Registration) requires your registrants to complete a brief form with fields and questions before they can receive the link to join the Webinar.<br>Use this API to list registration questions and fields that are to be answered by users while registering for a Webinar.<br>
1067     * **Prerequisites:**<br>  
1068     * * Pro or higher plan with a Webinar Add-on.
1069     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
1070     *  
1071     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
1072     *
1073     *
1074     *
1075     * **Parameters:**
1076     *
1077     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1078     */
1079    pub async fn registrants_questions_get(
1080        &self,
1081        webinar_id: i64,
1082    ) -> ClientResult<crate::Response<crate::types::WebinarRegistrantQuestions>> {
1083        let url = self.client.url(
1084            &format!(
1085                "/webinars/{}/registrants/questions",
1086                crate::progenitor_support::encode_path(&webinar_id.to_string()),
1087            ),
1088            None,
1089        );
1090        self.client
1091            .get(
1092                &url,
1093                crate::Message {
1094                    body: None,
1095                    content_type: None,
1096                },
1097            )
1098            .await
1099    }
1100    /**
1101     * Update registration questions.
1102     *
1103     * This function performs a `PATCH` to the `/webinars/{webinarId}/registrants/questions` endpoint.
1104     *
1105     * Scheduling a [Webinar with registration](https://support.zoom.us/hc/en-us/articles/204619915-Scheduling-a-Webinar-with-Registration) requires your registrants to complete a brief form with fields and questions before they can receive the link to join the Webinar.<br>Use this API to update registration questions and fields of a scheduled Webinar that are to be answered by users while registering for a Webinar.<br><br>
1106     * **Prerequisites:**<br>  
1107     * * Pro or higher plan with a Webinar Add-on.
1108     * * Registration option for Webinar should be set as required to use this API.
1109     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
1110     *  
1111     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
1112     *
1113     *
1114     *
1115     * **Parameters:**
1116     *
1117     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1118     */
1119    pub async fn registrant_question_update(
1120        &self,
1121        webinar_id: i64,
1122        body: &crate::types::WebinarRegistrantQuestions,
1123    ) -> ClientResult<crate::Response<()>> {
1124        let url = self.client.url(
1125            &format!(
1126                "/webinars/{}/registrants/questions",
1127                crate::progenitor_support::encode_path(&webinar_id.to_string()),
1128            ),
1129            None,
1130        );
1131        self.client
1132            .patch(
1133                &url,
1134                crate::Message {
1135                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
1136                    content_type: Some("application/json".to_string()),
1137                },
1138            )
1139            .await
1140    }
1141    /**
1142     * Get a webinar registrant.
1143     *
1144     * This function performs a `GET` to the `/webinars/{webinarId}/registrants/{registrantId}` endpoint.
1145     *
1146     * Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing Webinars. Webinar allows a host to broadcast a Zoom meeting to up to 10,000 attendees. Scheduling a [Webinar with registration](https://support.zoom.us/hc/en-us/articles/204619915-Scheduling-a-Webinar-with-Registration) requires your registrants to complete a brief form before receiving the link to join the Webinar.<br>Use this API to get details on a specific user who has registered for the Webinar.<br><br>
1147     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
1148     *  
1149     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
1150     * **Prerequisites:**<br>
1151     * * The account must have a Webinar plan.
1152     *
1153     * **Parameters:**
1154     *
1155     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1156     * * `registrant_id: &str` -- User's first name.
1157     * * `occurrence_id: &str` -- The meeting occurrence ID.
1158     */
1159    pub async fn registrant_get(
1160        &self,
1161        webinar_id: &str,
1162        registrant_id: &str,
1163        occurrence_id: &str,
1164    ) -> ClientResult<crate::Response<crate::types::Domains>> {
1165        let mut query_args: Vec<(String, String)> = Default::default();
1166        if !occurrence_id.is_empty() {
1167            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
1168        }
1169        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
1170        let url = self.client.url(
1171            &format!(
1172                "/webinars/{}/registrants/{}?{}",
1173                crate::progenitor_support::encode_path(webinar_id),
1174                crate::progenitor_support::encode_path(registrant_id),
1175                query_
1176            ),
1177            None,
1178        );
1179        self.client
1180            .get(
1181                &url,
1182                crate::Message {
1183                    body: None,
1184                    content_type: None,
1185                },
1186            )
1187            .await
1188    }
1189    /**
1190     * Delete a webinar registrant.
1191     *
1192     * This function performs a `DELETE` to the `/webinars/{webinarId}/registrants/{registrantId}` endpoint.
1193     *
1194     * Delete a webinar registrant.<br><br>
1195     * **Scopes**: `webinar:write:admin` `webinar:write`<br>
1196     *  <br>
1197     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
1198     *
1199     * **Parameters:**
1200     *
1201     * * `webinar_id: i64` -- Account seats.
1202     * * `registrant_id: &str` -- User's first name.
1203     * * `occurrence_id: &str` -- The webinar occurence ID.
1204     */
1205    pub async fn delete_registrant(
1206        &self,
1207        webinar_id: &str,
1208        registrant_id: &str,
1209        occurrence_id: &str,
1210    ) -> ClientResult<crate::Response<()>> {
1211        let mut query_args: Vec<(String, String)> = Default::default();
1212        if !occurrence_id.is_empty() {
1213            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
1214        }
1215        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
1216        let url = self.client.url(
1217            &format!(
1218                "/webinars/{}/registrants/{}?{}",
1219                crate::progenitor_support::encode_path(webinar_id),
1220                crate::progenitor_support::encode_path(registrant_id),
1221                query_
1222            ),
1223            None,
1224        );
1225        self.client
1226            .delete(
1227                &url,
1228                crate::Message {
1229                    body: None,
1230                    content_type: None,
1231                },
1232            )
1233            .await
1234    }
1235    /**
1236     * Get webinar absentees.
1237     *
1238     * This function performs a `GET` to the `/past_webinars/{WebinarUUID}/absentees` endpoint.
1239     *
1240     * List absentees of a webinar.<br><br>
1241     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
1242     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`
1243     *
1244     * **Parameters:**
1245     *
1246     * * `occurrence_id: &str` -- The meeting occurrence ID.
1247     * * `page_size: i64` -- The number of records returned within a single API call.
1248     * * `next_page_token: &str` -- The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
1249     * * `webinar: &str` -- The Webinar UUID. Each Webinar instance will generate its own Webinar UUID (i.e., after a Webinar ends, a new UUID will be generated for the next instance of the Webinar). Please double encode your UUID when using it for API calls if the UUID begins with a '/' or contains '//' in it.
1250     */
1251    pub async fn absentee(
1252        &self,
1253        occurrence_id: &str,
1254        page_size: i64,
1255        next_page_token: &str,
1256        webinar_uuid: &str,
1257    ) -> ClientResult<crate::Response<crate::types::Domains>> {
1258        let mut query_args: Vec<(String, String)> = Default::default();
1259        if !next_page_token.is_empty() {
1260            query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
1261        }
1262        if !occurrence_id.is_empty() {
1263            query_args.push(("occurrence_id".to_string(), occurrence_id.to_string()));
1264        }
1265        if page_size > 0 {
1266            query_args.push(("page_size".to_string(), page_size.to_string()));
1267        }
1268        let query_ = serde_urlencoded::to_string(&query_args).unwrap();
1269        let url = self.client.url(
1270            &format!(
1271                "/past_webinars/{}/absentees?{}",
1272                crate::progenitor_support::encode_path(webinar_uuid),
1273                query_
1274            ),
1275            None,
1276        );
1277        self.client
1278            .get(
1279                &url,
1280                crate::Message {
1281                    body: None,
1282                    content_type: None,
1283                },
1284            )
1285            .await
1286    }
1287    /**
1288     * Get webinar tracking sources.
1289     *
1290     * This function performs a `GET` to the `/webinars/{webinarId}/tracking_sources` endpoint.
1291     *
1292     * [Webinar Registration Tracking Sources](https://support.zoom.us/hc/en-us/articles/360000315683-Webinar-Registration-Source-Tracking) allow you to see where your registrants are coming from if you share the webinar registration page in multiple platforms. You can then use the source tracking to see the number of registrants generated from each platform.<br> Use this API to list information on all the tracking sources of a Webinar.<br>
1293     * **Scopes:** `webinar:read:admin`, `webinar:read`<br>
1294     *  
1295     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
1296     * **Prerequisites**:<br>
1297     * * [Webinar license](https://zoom.us/webinar).
1298     * * Registration must be required for the Webinar.
1299     *
1300     *
1301     * **Parameters:**
1302     *
1303     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1304     */
1305    pub async fn get_tracking_sources(
1306        &self,
1307        webinar_id: &str,
1308    ) -> ClientResult<crate::Response<crate::types::GetTrackingSourcesResponse>> {
1309        let url = self.client.url(
1310            &format!(
1311                "/webinars/{}/tracking_sources",
1312                crate::progenitor_support::encode_path(webinar_id),
1313            ),
1314            None,
1315        );
1316        self.client
1317            .get(
1318                &url,
1319                crate::Message {
1320                    body: None,
1321                    content_type: None,
1322                },
1323            )
1324            .await
1325    }
1326    /**
1327     * List past webinar poll results.
1328     *
1329     * This function performs a `GET` to the `/past_webinars/{webinarId}/polls` endpoint.
1330     *
1331     * The polling feature for webinar allows you to create single choice or multiple choice polling questions for your webinars. Use this API to retrieve the results for Webinar Polls of a specific Webinar.
1332     *
1333     * **Prerequisites:**<br>
1334     * * [Webinar license](https://zoom.us/webinar)<br>
1335     * **Scopes**: `webinar:read:admin`, `webinar:read`<br>
1336     * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
1337     *
1338     *
1339     *
1340     * **Parameters:**
1341     *
1342     * * `webinar_id: &str` -- The webinar ID or the webinar UUID.  If a webinar ID is provided in the request instead of a UUID, the response will be for the latest webinar instance.
1343     *   
1344     *   If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875==\"), you must **double encode** the UUID before making an API request.
1345     */
1346    pub async fn list_past_poll_results(
1347        &self,
1348        webinar_id: &str,
1349    ) -> ClientResult<crate::Response<crate::types::ReportMeetingPollsResponse>> {
1350        let url = self.client.url(
1351            &format!(
1352                "/past_webinars/{}/polls",
1353                crate::progenitor_support::encode_path(webinar_id),
1354            ),
1355            None,
1356        );
1357        self.client
1358            .get(
1359                &url,
1360                crate::Message {
1361                    body: None,
1362                    content_type: None,
1363                },
1364            )
1365            .await
1366    }
1367    /**
1368     * List Q&A of past webinar.
1369     *
1370     * This function performs a `GET` to the `/past_webinars/{webinarId}/qa` endpoint.
1371     *
1372     * The [Question & Answer (Q&A)](https://support.zoom.us/hc/en-us/articles/203686015-Getting-Started-with-Question-Answer) feature for Webinars allows attendees to ask questions during the Webinar and for the panelists, co-hosts and host to answer their questions.<br>
1373     * Use this API to list Q&A of a specific Webinar.
1374     *
1375     * **Prerequisites:**<br>
1376     * * [Webinar license](https://zoom.us/webinar)<br>
1377     * **Scopes**: `webinar:read:admin`, `webinar:read`<br>
1378     *  <br>
1379     *
1380     *
1381     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
1382     *
1383     * **Parameters:**
1384     *
1385     * * `webinar_id: &str` -- The webinar ID or the webinar UUID.  If a webinar ID is provided in the request instead of a UUID, the response will be for the latest webinar instance.
1386     *   
1387     *   If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875==\"), you must **double encode** the UUID before making an API request.
1388     */
1389    pub async fn list_past_qa(
1390        &self,
1391        webinar_id: &str,
1392    ) -> ClientResult<crate::Response<crate::types::ReportWebinarQaResponse>> {
1393        let url = self.client.url(
1394            &format!(
1395                "/past_webinars/{}/qa",
1396                crate::progenitor_support::encode_path(webinar_id),
1397            ),
1398            None,
1399        );
1400        self.client
1401            .get(
1402                &url,
1403                crate::Message {
1404                    body: None,
1405                    content_type: None,
1406                },
1407            )
1408            .await
1409    }
1410    /**
1411     * List webinar templates.
1412     *
1413     * This function performs a `GET` to the `/users/{userId}/webinar_templates` endpoint.
1414     *
1415     * Use this API to list a user's existing [webinar templates'](https://support.zoom.us/hc/en-us/articles/115001079746-Webinar-Templates) information. For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter.
1416     *
1417     * When you schedule a webinar, you can save the settings for that webinar as a template for scheduling future webinars.
1418     *
1419     * **Prerequisites:**
1420     * * Pro or a higher account with Webinar plan enabled.
1421     */
1422    pub async fn list_templates(
1423        &self,
1424        user_id: &str,
1425    ) -> ClientResult<crate::Response<crate::types::ListWebinarTemplatesResponse>> {
1426        let url = self.client.url(
1427            &format!(
1428                "/users/{}/webinar_templates",
1429                crate::progenitor_support::encode_path(user_id),
1430            ),
1431            None,
1432        );
1433        self.client
1434            .get(
1435                &url,
1436                crate::Message {
1437                    body: None,
1438                    content_type: None,
1439                },
1440            )
1441            .await
1442    }
1443    /**
1444     * Get live stream details.
1445     *
1446     * This function performs a `GET` to the `/webinars/{webinarId}/livestream` endpoint.
1447     *
1448     * Zoom allows users to [live stream a webinar](https://support.zoom.us/hc/en-us/articles/115001777826-Live-Streaming-Meetings-or-Webinars-Using-a-Custom-Service) to a custom platform. Use this API to get a webinar's live stream configuration details such as Stream URL, Stream Key and Page URL.<br><br>
1449     * **Prerequisites:**<br>
1450     * * Pro or higher plan with a Webinar Add-on.<br>
1451     * * Live streaming details must have been [configured](https://support.zoom.us/hc/en-us/articles/115001777826-Live-Streaming-Meetings-or-Webinars-Using-a-Custom-Service#h_01589a6f-a40a-4e18-a448-cb746e52ebc5) for the webinar.<br><br>
1452     * **Scopes:** `webinar:read:admin` `webinar:read`<br>
1453     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
1454     *
1455     *
1456     *
1457     *
1458     *
1459     * **Parameters:**
1460     *
1461     * * `webinar_id: &str` -- The webinar's unique ID.
1462     */
1463    pub async fn get_live_stream_details(
1464        &self,
1465        webinar_id: &str,
1466    ) -> ClientResult<crate::Response<crate::types::GetLiveStreamDetailsResponse>> {
1467        let url = self.client.url(
1468            &format!(
1469                "/webinars/{}/livestream",
1470                crate::progenitor_support::encode_path(webinar_id),
1471            ),
1472            None,
1473        );
1474        self.client
1475            .get(
1476                &url,
1477                crate::Message {
1478                    body: None,
1479                    content_type: None,
1480                },
1481            )
1482            .await
1483    }
1484    /**
1485     * Update a live stream.
1486     *
1487     * This function performs a `PATCH` to the `/webinars/{webinarId}/livestream` endpoint.
1488     *
1489     * Zoom allows users to [live stream a webinar](https://support.zoom.us/hc/en-us/articles/115001777826-Live-Streaming-Meetings-or-Webinars-Using-a-Custom-Service) to a custom platform. Use this API to update a webinar's live stream information.<br><br>
1490     * **Prerequisites:**<br>
1491     * * Pro or higher plan with a Webinar Add-on.<br>
1492     * * Live streaming details must have been [configured](https://support.zoom.us/hc/en-us/articles/115001777826-Live-Streaming-Meetings-or-Webinars-Using-a-Custom-Service#h_01589a6f-a40a-4e18-a448-cb746e52ebc5) for the webinar.<br><br>
1493     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
1494     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
1495     *
1496     *
1497     *
1498     *
1499     * **Parameters:**
1500     *
1501     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1502     */
1503    pub async fn live_stream_update(
1504        &self,
1505        webinar_id: &str,
1506        body: &crate::types::MeetingLiveStream,
1507    ) -> ClientResult<crate::Response<()>> {
1508        let url = self.client.url(
1509            &format!(
1510                "/webinars/{}/livestream",
1511                crate::progenitor_support::encode_path(webinar_id),
1512            ),
1513            None,
1514        );
1515        self.client
1516            .patch(
1517                &url,
1518                crate::Message {
1519                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
1520                    content_type: Some("application/json".to_string()),
1521                },
1522            )
1523            .await
1524    }
1525    /**
1526     * Update Live Stream Status.
1527     *
1528     * This function performs a `PATCH` to the `/webinars/{webinarId}/livestream/status` endpoint.
1529     *
1530     * Zoom allows users to [live stream a webinar](https://support.zoom.us/hc/en-us/articles/115001777826-Live-Streaming-Meetings-or-Webinars-Using-a-Custom-Service) to a custom platform. Use this API to update the status of a webinar's live stream.<br><br>
1531     * **Prerequisites:**<br>
1532     * * Pro or higher plan with a Webinar Add-on.<br>
1533     * * Live streaming details must have been [configured](https://support.zoom.us/hc/en-us/articles/115001777826-Live-Streaming-Meetings-or-Webinars-Using-a-Custom-Service#h_01589a6f-a40a-4e18-a448-cb746e52ebc5) for the webinar.<br><br>
1534     * **Scopes:** `webinar:write:admin` `webinar:write`<br>
1535     *  **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
1536     *
1537     *
1538     *
1539     * **Parameters:**
1540     *
1541     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1542     */
1543    pub async fn live_stream_status_update(
1544        &self,
1545        webinar_id: i64,
1546        body: &crate::types::WebinarLiveStreamStatus,
1547    ) -> ClientResult<crate::Response<()>> {
1548        let url = self.client.url(
1549            &format!(
1550                "/webinars/{}/livestream/status",
1551                crate::progenitor_support::encode_path(&webinar_id.to_string()),
1552            ),
1553            None,
1554        );
1555        self.client
1556            .patch(
1557                &url,
1558                crate::Message {
1559                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
1560                    content_type: Some("application/json".to_string()),
1561                },
1562            )
1563            .await
1564    }
1565    /**
1566     * Create webinar's invite links.
1567     *
1568     * This function performs a `POST` to the `/webinars/{webinarId}/invite_links` endpoint.
1569     *
1570     * Use this API to create a batch of invitation links for a webinar.
1571     *
1572     * **Scopes**: `webinar:write:admin`, `webinar:write`</br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
1573     *
1574     * **Prerequisites:**
1575     *
1576     * * Business, Education or API Plan with Webinar add-on.
1577     *
1578     * **Parameters:**
1579     *
1580     * * `webinar_id: i64` -- The webinar ID in "**long**" format(represented as int64 data type in JSON). .
1581     */
1582    pub async fn invite_links_create(
1583        &self,
1584        webinar_id: i64,
1585        body: &crate::types::InviteLink,
1586    ) -> ClientResult<crate::Response<crate::types::InviteLinks>> {
1587        let url = self.client.url(
1588            &format!(
1589                "/webinars/{}/invite_links",
1590                crate::progenitor_support::encode_path(&webinar_id.to_string()),
1591            ),
1592            None,
1593        );
1594        self.client
1595            .post(
1596                &url,
1597                crate::Message {
1598                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
1599                    content_type: Some("application/json".to_string()),
1600                },
1601            )
1602            .await
1603    }
1604}