zoom_api/cloud_recording.rs
1use crate::Client;
2use crate::ClientResult;
3
4pub struct CloudRecording {
5 pub client: Client,
6}
7
8impl CloudRecording {
9 #[doc(hidden)]
10 pub fn new(client: Client) -> Self {
11 CloudRecording { client }
12 }
13
14 /**
15 * List all recordings.
16 *
17 * This function performs a `GET` to the `/users/{userId}/recordings` endpoint.
18 *
19 * Use this API to list all [cloud recordings](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording) of a user. 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 * <p style="background-color:#e1f5fe; color:#01579b; padding:8px"> <b>Note:</b> To access a user's password protected cloud recording, add an <code>access_token</code> parameter to the download URL and provide either the <a href="https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-jwt-app">JWT</a> or the user's OAuth access token as the value of the <code>access_token</code> parameter.</p>
22 *
23 * When a user records a meeting or a webinar by choosing the **Record to the Cloud** option, the video, audio, and chat text are recorded in the Zoom cloud.
24 *
25 * **Scopes:** `recording:read:admin`, `recording:read`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
26 *
27 * **Prerequisites:**
28 * * Pro or a higher plan.
29 * * Cloud Recording must be enabled on the user's account.
30 *
31 * **Parameters:**
32 *
33 * * `user_id: &str` -- The user ID or email address of the user. For user-level apps, pass `me` as the value for userId.
34 * * `page_size: i64` -- The number of records returned within a single API call.
35 * * `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.
36 * * `mc: &str` -- Query Metadata of Recording if an On-Premise Meeting Connector was used for the meeting.
37 * * `trash: 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.
38 * * `from: chrono::NaiveDate` -- The start date in 'yyyy-mm-dd' UTC format for the date range for which you would like to retrieve recordings. The maximum range can be a month. If no value is provided for this field, the default will be current date. For example, if you make the API request on June 30, 2020, without providing the “from” and “to” parameters, by default the value of 'from' field will be “2020-06-30” and the value of the 'to' field will be “2020-07-01”.
39 *
40 * **Note**: The "trash" files cannot be filtered by date range and thus, the "from" and "to" fields should not be used for trash files.
41 * * `to: chrono::NaiveDate` -- End date in 'yyyy-mm-dd' 'yyyy-mm-dd' UTC format. .
42 * * `trash_type: &str` -- The type of Cloud recording that you would like to retrieve from the trash. The value can be one of the following:<br>
43 * `meeting_recordings`: List all meeting recordings from the trash.<br>
44 * `recording_file`: List all individual recording files from the trash. .
45 */
46 pub async fn recordings_list(
47 &self,
48 user_id: &str,
49 page_size: i64,
50 next_page_token: &str,
51 mc: &str,
52 trash: bool,
53 from: chrono::NaiveDate,
54 to: chrono::NaiveDate,
55 trash_type: &str,
56 ) -> ClientResult<crate::Response<crate::types::Domains>> {
57 let mut query_args: Vec<(String, String)> = Default::default();
58 if !from.to_string().is_empty() {
59 query_args.push(("from".to_string(), from.to_string()));
60 }
61 if !mc.is_empty() {
62 query_args.push(("mc".to_string(), mc.to_string()));
63 }
64 if !next_page_token.is_empty() {
65 query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
66 }
67 if page_size > 0 {
68 query_args.push(("page_size".to_string(), page_size.to_string()));
69 }
70 if !to.to_string().is_empty() {
71 query_args.push(("to".to_string(), to.to_string()));
72 }
73 if trash {
74 query_args.push(("trash".to_string(), trash.to_string()));
75 }
76 if !trash_type.is_empty() {
77 query_args.push(("trash_type".to_string(), trash_type.to_string()));
78 }
79 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
80 let url = self.client.url(
81 &format!(
82 "/users/{}/recordings?{}",
83 crate::progenitor_support::encode_path(user_id),
84 query_
85 ),
86 None,
87 );
88 self.client
89 .get(
90 &url,
91 crate::Message {
92 body: None,
93 content_type: None,
94 },
95 )
96 .await
97 }
98 /**
99 * Get meeting recordings.
100 *
101 * This function performs a `GET` to the `/meetings/{meetingId}/recordings` endpoint.
102 *
103 * Get all the [recordings](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording#h_7420acb5-1897-4061-87b4-5b76e99c03b4) from a meeting or Webinar instance. The recording files can be downloaded via the `download_url` property listed in the response.
104 *
105 * > To access a password-protected cloud recording, add an `access_token` parameter to the download URL and provide OAuth access token or [JWT](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-jwt-app) as the `access_token` value.
106 *
107 * **Scopes:** `recording:read:admin`, `recording:read`</br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
108 *
109 * **Parameters:**
110 *
111 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
112 *
113 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
114 *
115 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
116 * * `include_fields: &str` -- Get the `download_access_token` field for downloading meeting recordings.
117 * * `ttl: u64` -- Time to live (TTL) of the `download_access_token`. This is only valid if the `include_fields` query parameter contains `download_access_token`. The range is between 0-604800.
118 */
119 pub async fn recording_get(
120 &self,
121 meeting_id: &str,
122 include_fields: &str,
123 ttl: u64,
124 ) -> ClientResult<crate::Response<crate::types::RecordingGetResponseAllOf>> {
125 let mut query_args: Vec<(String, String)> = Default::default();
126 if !include_fields.is_empty() {
127 query_args.push(("include_fields".to_string(), include_fields.to_string()));
128 }
129 if !ttl.to_string().is_empty() {
130 query_args.push(("ttl".to_string(), ttl.to_string()));
131 }
132 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
133 let url = self.client.url(
134 &format!(
135 "/meetings/{}/recordings?{}",
136 crate::progenitor_support::encode_path(meeting_id),
137 query_
138 ),
139 None,
140 );
141 self.client
142 .get(
143 &url,
144 crate::Message {
145 body: None,
146 content_type: None,
147 },
148 )
149 .await
150 }
151 /**
152 * Delete meeting recordings.
153 *
154 * This function performs a `DELETE` to the `/meetings/{meetingId}/recordings` endpoint.
155 *
156 * Delete all recording files of a meeting.<br><br>
157 *
158 * **Scopes:** `recording:write:admin` `recording:write`<br>
159 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
160 * **Prerequisites**:
161 * * Cloud Recording should be enabled on the user's account.<br>
162 *
163 *
164 * **Parameters:**
165 *
166 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
167 *
168 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
169 *
170 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
171 * * `action: crate::types::RecordingDeleteAction` -- The recording delete actions:<br>`trash` - Move recording to trash.<br>`delete` - Delete recording permanently.
172 */
173 pub async fn recording_delete(
174 &self,
175 meeting_id: &str,
176 action: crate::types::RecordingDeleteAction,
177 ) -> ClientResult<crate::Response<()>> {
178 let mut query_args: Vec<(String, String)> = Default::default();
179 if !action.to_string().is_empty() {
180 query_args.push(("action".to_string(), action.to_string()));
181 }
182 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
183 let url = self.client.url(
184 &format!(
185 "/meetings/{}/recordings?{}",
186 crate::progenitor_support::encode_path(meeting_id),
187 query_
188 ),
189 None,
190 );
191 self.client
192 .delete(
193 &url,
194 crate::Message {
195 body: None,
196 content_type: None,
197 },
198 )
199 .await
200 }
201 /**
202 * Delete a meeting recording file.
203 *
204 * This function performs a `DELETE` to the `/meetings/{meetingId}/recordings/{recordingId}` endpoint.
205 *
206 * Delete a specific recording file from a meeting.<p style="background-color:#e1f5fe; color:#01579b; padding:8px"> <b>Note:</b> To use this API, you must enable the <b>The host can delete cloud recordings</b> setting. You can find this setting in the <b>Recording</b> tab of the <b>Settings</b> interface in the [Zoom web portal](https://zoom.us/).</p>
207 *
208 * **Scopes**: `recording:write:admin`, `recording:write`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
209 *
210 * **Parameters:**
211 *
212 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
213 *
214 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
215 *
216 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
217 * * `recording_id: &str` -- User's first name.
218 * * `action: crate::types::RecordingDeleteAction` -- The recording delete actions:<br>`trash` - Move recording to trash.<br>`delete` - Delete recording permanently.
219 */
220 pub async fn recording_delete_one(
221 &self,
222 meeting_id: &str,
223 recording_id: &str,
224 action: crate::types::RecordingDeleteAction,
225 ) -> ClientResult<crate::Response<()>> {
226 let mut query_args: Vec<(String, String)> = Default::default();
227 if !action.to_string().is_empty() {
228 query_args.push(("action".to_string(), action.to_string()));
229 }
230 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
231 let url = self.client.url(
232 &format!(
233 "/meetings/{}/recordings/{}?{}",
234 crate::progenitor_support::encode_path(meeting_id),
235 crate::progenitor_support::encode_path(recording_id),
236 query_
237 ),
238 None,
239 );
240 self.client
241 .delete(
242 &url,
243 crate::Message {
244 body: None,
245 content_type: None,
246 },
247 )
248 .await
249 }
250 /**
251 * Recover meeting recordings.
252 *
253 * This function performs a `PUT` to the `/meetings/{meetingId}/recordings/status` endpoint.
254 *
255 * Zoom allows users to recover recordings from trash for up to 30 days from the deletion date. Use this API to recover all deleted [Cloud Recordings](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording) of a specific meeting.<br><br>
256 * **Scopes**: `recording:write:admin` `recording:write`<br>
257 *
258 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
259 * **Prerequisites**:<br>
260 * * A Pro user with Cloud Recording enabled.
261 *
262 * **Parameters:**
263 *
264 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
265 *
266 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
267 *
268 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
269 */
270 pub async fn recording_status_update(
271 &self,
272 meeting_id: &str,
273 body: &crate::types::RecordingStatusUpdateBodyRequest,
274 ) -> ClientResult<crate::Response<()>> {
275 let url = self.client.url(
276 &format!(
277 "/meetings/{}/recordings/status",
278 crate::progenitor_support::encode_path(meeting_id),
279 ),
280 None,
281 );
282 self.client
283 .put(
284 &url,
285 crate::Message {
286 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
287 content_type: None,
288 },
289 )
290 .await
291 }
292 /**
293 * Recover a single recording.
294 *
295 * This function performs a `PUT` to the `/meetings/{meetingId}/recordings/{recordingId}/status` endpoint.
296 *
297 * Zoom allows users to recover recordings from trash for up to 30 days from the deletion date. Use this API to recover a single recording file from the meeting.<br>
298 * **Scopes:** `recording:write:admin` `recording:write`<br>
299 *
300 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
301 *
302 *
303 * **Parameters:**
304 *
305 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
306 *
307 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
308 *
309 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
310 * * `recording_id: &str` -- User's first name.
311 */
312 pub async fn recording_status_update_one(
313 &self,
314 meeting_id: &str,
315 recording_id: &str,
316 body: &crate::types::RecordingStatusUpdateBodyRequest,
317 ) -> ClientResult<crate::Response<()>> {
318 let url = self.client.url(
319 &format!(
320 "/meetings/{}/recordings/{}/status",
321 crate::progenitor_support::encode_path(meeting_id),
322 crate::progenitor_support::encode_path(recording_id),
323 ),
324 None,
325 );
326 self.client
327 .put(
328 &url,
329 crate::Message {
330 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
331 content_type: None,
332 },
333 )
334 .await
335 }
336 /**
337 * Get meeting recording settings.
338 *
339 * This function performs a `GET` to the `/meetings/{meetingId}/recordings/settings` endpoint.
340 *
341 * Retrieve settings applied to a meeting's [Cloud Recording](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording).<br><br>
342 * **Scopes**: `recording:read:admin` `recording:read`<br>
343 *
344 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` <br>
345 *
346 * **Parameters:**
347 *
348 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
349 *
350 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
351 *
352 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
353 */
354 pub async fn recording_setting_update(
355 &self,
356 meeting_id: &str,
357 ) -> ClientResult<crate::Response<crate::types::RecordingSettings>> {
358 let url = self.client.url(
359 &format!(
360 "/meetings/{}/recordings/settings",
361 crate::progenitor_support::encode_path(meeting_id),
362 ),
363 None,
364 );
365 self.client
366 .get(
367 &url,
368 crate::Message {
369 body: None,
370 content_type: None,
371 },
372 )
373 .await
374 }
375 /**
376 * Update meeting recording settings.
377 *
378 * This function performs a `PATCH` to the `/meetings/{meetingId}/recordings/settings` endpoint.
379 *
380 * Update settings applied to a meeting's [Cloud Recording](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording)<br><br>
381 * **Scopes**: `recording:write:admin` `recording:write`<br>
382 *
383 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` <br>
384 *
385 * **Parameters:**
386 *
387 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
388 *
389 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
390 *
391 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
392 */
393 pub async fn recording_settings_update(
394 &self,
395 meeting_id: &str,
396 body: &crate::types::RecordingSettings,
397 ) -> ClientResult<crate::Response<()>> {
398 let url = self.client.url(
399 &format!(
400 "/meetings/{}/recordings/settings",
401 crate::progenitor_support::encode_path(meeting_id),
402 ),
403 None,
404 );
405 self.client
406 .patch(
407 &url,
408 crate::Message {
409 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
410 content_type: Some("application/json".to_string()),
411 },
412 )
413 .await
414 }
415 /**
416 * List recording registrants.
417 *
418 * This function performs a `GET` to the `/meetings/{meetingId}/recordings/registrants` endpoint.
419 *
420 * Cloud Recordings of past Zoom Meetings can be made [on-demand](https://support.zoom.us/hc/en-us/articles/360000488283-On-demand-Recordings). Users should be [registered](https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/meetingrecordingregistrantcreate) to view these recordings.
421 *
422 * Use this API to list registrants of **On-demand Cloud Recordings** of a past meeting.<br>
423 * **Scopes:** `recording:read:admin`, `recording:read`.<br>
424 *
425 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
426 *
427 *
428 * **Parameters:**
429 *
430 * * `meeting_id: i64` -- The meeting ID in **long** format. The data type of this field is "long"(represented as int64 in JSON).
431 *
432 * While storing it in your database, store it as a **long** data type and **not as an integer**, as the Meeting IDs can be longer than 10 digits.
433 * * `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.
434 * * `page_size: i64` -- The number of records returned within a single API call.
435 * * `page_number: i64` --
436 * **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.
437 *
438 * The page number of the current page in the returned records.
439 * * `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.
440 */
441 pub async fn meeting_recording_registrant(
442 &self,
443 meeting_id: i64,
444 status: crate::types::MeetingRegistrantsStatus,
445 page_size: i64,
446 page_number: i64,
447 next_page_token: &str,
448 ) -> ClientResult<crate::Response<crate::types::Domains>> {
449 let mut query_args: Vec<(String, String)> = Default::default();
450 if !next_page_token.is_empty() {
451 query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
452 }
453 if page_number > 0 {
454 query_args.push(("page_number".to_string(), page_number.to_string()));
455 }
456 if page_size > 0 {
457 query_args.push(("page_size".to_string(), page_size.to_string()));
458 }
459 if !status.to_string().is_empty() {
460 query_args.push(("status".to_string(), status.to_string()));
461 }
462 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
463 let url = self.client.url(
464 &format!(
465 "/meetings/{}/recordings/registrants?{}",
466 crate::progenitor_support::encode_path(&meeting_id.to_string()),
467 query_
468 ),
469 None,
470 );
471 self.client
472 .get(
473 &url,
474 crate::Message {
475 body: None,
476 content_type: None,
477 },
478 )
479 .await
480 }
481 /**
482 * Create a recording registrant.
483 *
484 * This function performs a `POST` to the `/meetings/{meetingId}/recordings/registrants` endpoint.
485 *
486 * Cloud Recordings of past Zoom Meetings can be made [on-demand](https://support.zoom.us/hc/en-us/articles/360000488283-On-demand-Recordings). Users should be [registered](https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/meetingrecordingregistrantcreate) to view these recordings.
487 *
488 * Use this API to register a user to gain access to **On-demand Cloud Recordings** of a past meeting.<br>
489 * **Scopes:** `recording:write:admin`, `recording:write`.<br>
490 *
491 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
492 *
493 *
494 *
495 * **Parameters:**
496 *
497 * * `meeting_id: i64` -- The meeting ID in **long** format. The data type of this field is "long"(represented as int64 in JSON).
498 *
499 * While storing it in your database, store it as a **long** data type and **not as an integer**, as the Meeting IDs can be longer than 10 digits.
500 */
501 pub async fn meeting_recording_registrant_create(
502 &self,
503 meeting_id: i64,
504 ) -> ClientResult<crate::Response<crate::types::MeetingRecordingRegistrantCreateResponse>> {
505 let url = self.client.url(
506 &format!(
507 "/meetings/{}/recordings/registrants",
508 crate::progenitor_support::encode_path(&meeting_id.to_string()),
509 ),
510 None,
511 );
512 self.client
513 .post(
514 &url,
515 crate::Message {
516 body: None,
517 content_type: Some("application/json".to_string()),
518 },
519 )
520 .await
521 }
522 /**
523 * Update registrant's status.
524 *
525 * This function performs a `PUT` to the `/meetings/{meetingId}/recordings/registrants/status` endpoint.
526 *
527 * A registrant can either be approved or denied from viewing the [on-demand](https://support.zoom.us/hc/en-us/articles/360000488283-On-demand-Recordings) recording.
528 * Use this API to update a registrant's status.
529 *
530 * **Scopes:** `recording:write:admin`, `recording:write`<br>
531 *
532 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
533 *
534 *
535 * **Parameters:**
536 *
537 * * `meeting_id: i64` -- The meeting ID in **long** format. The data type of this field is "long"(represented as int64 in JSON).
538 *
539 * While storing it in your database, store it as a **long** data type and **not as an integer**, as the Meeting IDs can be longer than 10 digits.
540 */
541 pub async fn meeting_recording_registrant_status(
542 &self,
543 meeting_id: i64,
544 body: &crate::types::RecordingRegistrantStatus,
545 ) -> ClientResult<crate::Response<()>> {
546 let url = self.client.url(
547 &format!(
548 "/meetings/{}/recordings/registrants/status",
549 crate::progenitor_support::encode_path(&meeting_id.to_string()),
550 ),
551 None,
552 );
553 self.client
554 .put(
555 &url,
556 crate::Message {
557 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
558 content_type: Some("application/json".to_string()),
559 },
560 )
561 .await
562 }
563 /**
564 * Get registration questions.
565 *
566 * This function performs a `GET` to the `/meetings/{meetingId}/recordings/registrants/questions` endpoint.
567 *
568 * For [on-demand](https://support.zoom.us/hc/en-us/articles/360000488283-On-demand-Recordings) meeting recordings, you can include fields with questions that will be shown to registrants when they register to view the recording.
569 *
570 * Use this API to retrieve a list of questions that are displayed for users to complete when registering to view the recording of a specific meeting.<br>
571 * **Scopes:** `recording:read:admin`, `recording:read`<br>
572 *
573 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
574 *
575 *
576 * **Parameters:**
577 *
578 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
579 *
580 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
581 *
582 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
583 */
584 pub async fn recording_registrants_questions_get(
585 &self,
586 meeting_id: &str,
587 ) -> ClientResult<crate::Response<crate::types::RecordingRegistrantQuestionsData>> {
588 let url = self.client.url(
589 &format!(
590 "/meetings/{}/recordings/registrants/questions",
591 crate::progenitor_support::encode_path(meeting_id),
592 ),
593 None,
594 );
595 self.client
596 .get(
597 &url,
598 crate::Message {
599 body: None,
600 content_type: None,
601 },
602 )
603 .await
604 }
605 /**
606 * Update registration questions.
607 *
608 * This function performs a `PATCH` to the `/meetings/{meetingId}/recordings/registrants/questions` endpoint.
609 *
610 * For [on-demand](https://support.zoom.us/hc/en-us/articles/360000488283-On-demand-Recordings) meeting recordings, you can include fields with questions that will be shown to registrants when they register to view the recording.
611 *
612 * Use this API to update registration questions that are to be answered by users while registering to view a recording.<br>
613 * **Scopes:** `recording:write:admin`, `recording:write`<br>
614 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>
615 *
616 *
617 * **Parameters:**
618 *
619 * * `meeting_id: &str` -- To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance.
620 *
621 * To get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance.
622 *
623 * If a UUID starts with "/" or contains "//" (example: "/ajXp112QmuoKj4854875=="), you must **double encode** the UUID before making an API request. .
624 */
625 pub async fn recording_registrant_question_update(
626 &self,
627 meeting_id: &str,
628 body: &crate::types::RecordingRegistrantQuestionsData,
629 ) -> ClientResult<crate::Response<()>> {
630 let url = self.client.url(
631 &format!(
632 "/meetings/{}/recordings/registrants/questions",
633 crate::progenitor_support::encode_path(meeting_id),
634 ),
635 None,
636 );
637 self.client
638 .patch(
639 &url,
640 crate::Message {
641 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
642 content_type: Some("application/json".to_string()),
643 },
644 )
645 .await
646 }
647 /**
648 * List recordings of an account.
649 *
650 * This function performs a `GET` to the `/accounts/{accountId}/recordings` endpoint.
651 *
652 * List [Cloud Recordings](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording) available on an Account.
653 *
654 * > To access a password protected cloud recording, add an "access_token" parameter to the download URL and provide [JWT](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-jwt-app) as the value of the "access_token".
655 * > <br>
656 * > **Prerequisites**:<br>
657 * * A Pro or a higher paid plan with Cloud Recording option enabled.<br>
658 * **Scopes**: `recording:read:admin` or `account:read:admin`
659 *
660 * If the scope `recording:read:admin` is used, the Account ID of the Account must be provided in the `accountId` path parameter to list recordings that belong to the Account. This scope only works for sub accounts.
661 *
662 * To list recordings of a master account, the scope must be `account:read:admin` and the value of `accountId` should be `me`.<br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
663 *
664 *
665 * **Parameters:**
666 *
667 * * `page_size: i64` -- The number of records returned within a single API call.
668 * * `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.
669 * * `from: chrono::DateTime<chrono::Utc>` -- The start date in UTC for the monthly range for which you would like to retrieve recordings. The maximum range can be a month. If no value is provided for this field, the default will be current date. For example, if you make the API request on June 30, 2020, without providing the “from” and “to” parameters, by default the value of 'from' field will be “2020-06-30” and the value of the 'to' field will be “2020-07-01”.
670 * * `to: chrono::DateTime<chrono::Utc>` -- The end date for the monthly range for which you would like to retrieve recordings. The maximum range can be a month.
671 * * `account_id: &str` -- Unique identifier of the account.
672 */
673 pub async fn get_account(
674 &self,
675 account_id: &str,
676 page_size: i64,
677 next_page_token: &str,
678 from: Option<chrono::DateTime<chrono::Utc>>,
679 to: Option<chrono::DateTime<chrono::Utc>>,
680 ) -> ClientResult<crate::Response<Vec<crate::types::GetAccountCloudRecordingResponseMeetings>>>
681 {
682 let mut query_args: Vec<(String, String)> = Default::default();
683 if let Some(date) = from {
684 query_args.push(("from".to_string(), date.to_rfc3339()));
685 }
686 if !next_page_token.is_empty() {
687 query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
688 }
689 if page_size > 0 {
690 query_args.push(("page_size".to_string(), page_size.to_string()));
691 }
692 if let Some(date) = to {
693 query_args.push(("to".to_string(), date.to_rfc3339()));
694 }
695 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
696 let url = self.client.url(
697 &format!(
698 "/accounts/{}/recordings?{}",
699 crate::progenitor_support::encode_path(account_id),
700 query_
701 ),
702 None,
703 );
704 let resp: crate::Response<crate::types::GetAccountCloudRecordingResponse> = self
705 .client
706 .get(
707 &url,
708 crate::Message {
709 body: None,
710 content_type: None,
711 },
712 )
713 .await?;
714
715 // Return our response data.
716 Ok(crate::Response::new(
717 resp.status,
718 resp.headers,
719 resp.body.meetings.to_vec(),
720 ))
721 }
722 /**
723 * List recordings of an account.
724 *
725 * This function performs a `GET` to the `/accounts/{accountId}/recordings` endpoint.
726 *
727 * As opposed to `get_account`, this function returns all the pages of the request at once.
728 *
729 * List [Cloud Recordings](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording) available on an Account.
730 *
731 * > To access a password protected cloud recording, add an "access_token" parameter to the download URL and provide [JWT](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-jwt-app) as the value of the "access_token".
732 * > <br>
733 * > **Prerequisites**:<br>
734 * * A Pro or a higher paid plan with Cloud Recording option enabled.<br>
735 * **Scopes**: `recording:read:admin` or `account:read:admin`
736 *
737 * If the scope `recording:read:admin` is used, the Account ID of the Account must be provided in the `accountId` path parameter to list recordings that belong to the Account. This scope only works for sub accounts.
738 *
739 * To list recordings of a master account, the scope must be `account:read:admin` and the value of `accountId` should be `me`.<br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
740 *
741 */
742 pub async fn get_all_account(
743 &self,
744 account_id: &str,
745 from: Option<chrono::DateTime<chrono::Utc>>,
746 to: Option<chrono::DateTime<chrono::Utc>>,
747 ) -> ClientResult<crate::Response<Vec<crate::types::GetAccountCloudRecordingResponseMeetings>>>
748 {
749 let mut query_args: Vec<(String, String)> = Default::default();
750 if let Some(date) = from {
751 query_args.push(("from".to_string(), date.to_rfc3339()));
752 }
753 if let Some(date) = to {
754 query_args.push(("to".to_string(), date.to_rfc3339()));
755 }
756 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
757 let url = self.client.url(
758 &format!(
759 "/accounts/{}/recordings?{}",
760 crate::progenitor_support::encode_path(account_id),
761 query_
762 ),
763 None,
764 );
765 let crate::Response::<crate::types::GetAccountCloudRecordingResponse> {
766 mut status,
767 mut headers,
768 mut body,
769 } = self
770 .client
771 .get(
772 &url,
773 crate::Message {
774 body: None,
775 content_type: None,
776 },
777 )
778 .await?;
779
780 let mut meetings = body.meetings;
781 let mut page = body.next_page_token;
782
783 // Paginate if we should.
784 while !page.is_empty() {
785 // Check if we already have URL params and need to concat the token.
786 if !url.contains('?') {
787 crate::Response::<crate::types::GetAccountCloudRecordingResponse> {
788 status,
789 headers,
790 body,
791 } = self
792 .client
793 .get(
794 &format!("{}?next_page_token={}", url, page),
795 crate::Message {
796 body: None,
797 content_type: None,
798 },
799 )
800 .await?;
801 } else {
802 crate::Response::<crate::types::GetAccountCloudRecordingResponse> {
803 status,
804 headers,
805 body,
806 } = self
807 .client
808 .get(
809 &format!("{}&next_page_token={}", url, page),
810 crate::Message {
811 body: None,
812 content_type: None,
813 },
814 )
815 .await?;
816 }
817
818 meetings.append(&mut body.meetings);
819
820 if !body.next_page_token.is_empty() && body.next_page_token != page {
821 page = body.next_page_token.to_string();
822 } else {
823 page = "".to_string();
824 }
825 }
826
827 // Return our response data.
828 Ok(crate::Response::new(status, headers, meetings))
829 }
830}