zoom_api/rooms.rs
1use crate::Client;
2use crate::ClientResult;
3
4pub struct Rooms {
5 pub client: Client,
6}
7
8impl Rooms {
9 #[doc(hidden)]
10 pub fn new(client: Client) -> Self {
11 Rooms { client }
12 }
13
14 /**
15 * List Zoom Rooms.
16 *
17 * This function performs a `GET` to the `/rooms` endpoint.
18 *
19 * Zoom Rooms is a software-based room system that provides an integrated experience for audio conferencing, wireless screen sharing and video conferencing. Use this API to list all the existing [Zoom Rooms](https://support.zoom.us/hc/en-us/articles/207483343-Getting-Started-with-Zoom-Rooms) in a Zoom account.<br><br>
20 * **Prerequisites:**<br>
21 * * Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>
22 * **Scopes**: `room:read:admin`<br>
23 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
24 *
25 * **Parameters:**
26 *
27 * * `status: crate::types::ListZoomRoomsStatus` -- The status of the Zoom Room.
28 * * `type_: crate::types::ListZoomRoomsType` -- Type of the Zoom Rooms.
29 * * `unassigned_rooms: 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.
30 * * `page_size: i64` -- The number of records returned within a single API call.
31 * * `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.
32 * * `location_id: &str` -- Parent location ID of the Zoom Room.
33 */
34 pub async fn list_zoom(
35 &self,
36 status: crate::types::ListZoomRoomsStatus,
37 type_: crate::types::ListZoomRoomsType,
38 unassigned_rooms: bool,
39 page_size: i64,
40 next_page_token: &str,
41 location_id: &str,
42 ) -> ClientResult<crate::Response<Vec<crate::types::ListZoomRoomsResponse>>> {
43 let mut query_args: Vec<(String, String)> = Default::default();
44 if !location_id.is_empty() {
45 query_args.push(("location_id".to_string(), location_id.to_string()));
46 }
47 if !next_page_token.is_empty() {
48 query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
49 }
50 if page_size > 0 {
51 query_args.push(("page_size".to_string(), page_size.to_string()));
52 }
53 if !status.to_string().is_empty() {
54 query_args.push(("status".to_string(), status.to_string()));
55 }
56 if !type_.to_string().is_empty() {
57 query_args.push(("type".to_string(), type_.to_string()));
58 }
59 if unassigned_rooms {
60 query_args.push(("unassigned_rooms".to_string(), unassigned_rooms.to_string()));
61 }
62 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
63 let url = self.client.url(&format!("/rooms?{}", query_), None);
64 let resp: crate::Response<crate::types::ListZoomRoomsResponseData> = self
65 .client
66 .get(
67 &url,
68 crate::Message {
69 body: None,
70 content_type: None,
71 },
72 )
73 .await?;
74
75 // Return our response data.
76 Ok(crate::Response::new(
77 resp.status,
78 resp.headers,
79 resp.body.rooms.to_vec(),
80 ))
81 }
82 /**
83 * List Zoom Rooms.
84 *
85 * This function performs a `GET` to the `/rooms` endpoint.
86 *
87 * As opposed to `list_zoom`, this function returns all the pages of the request at once.
88 *
89 * Zoom Rooms is a software-based room system that provides an integrated experience for audio conferencing, wireless screen sharing and video conferencing. Use this API to list all the existing [Zoom Rooms](https://support.zoom.us/hc/en-us/articles/207483343-Getting-Started-with-Zoom-Rooms) in a Zoom account.<br><br>
90 * **Prerequisites:**<br>
91 * * Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>
92 * **Scopes**: `room:read:admin`<br>
93 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
94 */
95 pub async fn list_all_zoom(
96 &self,
97 status: crate::types::ListZoomRoomsStatus,
98 type_: crate::types::ListZoomRoomsType,
99 unassigned_rooms: bool,
100 location_id: &str,
101 ) -> ClientResult<crate::Response<Vec<crate::types::ListZoomRoomsResponse>>> {
102 let mut query_args: Vec<(String, String)> = Default::default();
103 if !location_id.is_empty() {
104 query_args.push(("location_id".to_string(), location_id.to_string()));
105 }
106 if !status.to_string().is_empty() {
107 query_args.push(("status".to_string(), status.to_string()));
108 }
109 if !type_.to_string().is_empty() {
110 query_args.push(("type".to_string(), type_.to_string()));
111 }
112 if unassigned_rooms {
113 query_args.push(("unassigned_rooms".to_string(), unassigned_rooms.to_string()));
114 }
115 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
116 let url = self.client.url(&format!("/rooms?{}", query_), None);
117 let crate::Response::<crate::types::ListZoomRoomsResponseData> {
118 mut status,
119 mut headers,
120 mut body,
121 } = self
122 .client
123 .get(
124 &url,
125 crate::Message {
126 body: None,
127 content_type: None,
128 },
129 )
130 .await?;
131
132 let mut rooms = body.rooms;
133 let mut page = body.next_page_token;
134
135 // Paginate if we should.
136 while !page.is_empty() {
137 // Check if we already have URL params and need to concat the token.
138 if !url.contains('?') {
139 crate::Response::<crate::types::ListZoomRoomsResponseData> {
140 status,
141 headers,
142 body,
143 } = self
144 .client
145 .get(
146 &format!("{}?next_page_token={}", url, page),
147 crate::Message {
148 body: None,
149 content_type: None,
150 },
151 )
152 .await?;
153 } else {
154 crate::Response::<crate::types::ListZoomRoomsResponseData> {
155 status,
156 headers,
157 body,
158 } = self
159 .client
160 .get(
161 &format!("{}&next_page_token={}", url, page),
162 crate::Message {
163 body: None,
164 content_type: None,
165 },
166 )
167 .await?;
168 }
169
170 rooms.append(&mut body.rooms);
171
172 if !body.next_page_token.is_empty() && body.next_page_token != page {
173 page = body.next_page_token.to_string();
174 } else {
175 page = "".to_string();
176 }
177 }
178
179 // Return our response data.
180 Ok(crate::Response::new(status, headers, rooms))
181 }
182 /**
183 * Add a Zoom Room.
184 *
185 * This function performs a `POST` to the `/rooms` endpoint.
186 *
187 * Use this API to [add a Zoom Room](https://support.zoom.us/hc/en-us/articles/202822279-Add-Zoom-Rooms-on-Web-Portal) to a Zoom account.<br><br>
188 * **Prerequisites:**<br>
189 * * Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>
190 * **Scopes**: `room:write:admin`<br>
191 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
192 */
193 pub async fn add(
194 &self,
195 body: &crate::types::AddRoomRequest,
196 ) -> ClientResult<crate::Response<crate::types::AddRoomResponse>> {
197 let url = self.client.url("/rooms", None);
198 self.client
199 .post(
200 &url,
201 crate::Message {
202 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
203 content_type: Some("application/json".to_string()),
204 },
205 )
206 .await
207 }
208 /**
209 * Get Zoom Room profile.
210 *
211 * This function performs a `GET` to the `/rooms/{roomId}` endpoint.
212 *
213 *
214 * Zoom Rooms is a software-based room system that provides an integrated experience for audio conferencing, wireless screen sharing and video conferencing. Use this API to get detailed information on a specific Zoom Room in a Zoom account.
215 *
216 * **Prerequisites:**<br>
217 * * Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>
218 * **Scopes**: `room:read:admin`<br>
219 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
220 *
221 * **Parameters:**
222 *
223 * * `room_id: &str` -- Unique Identifier of the Zoom Room. This can be retrieved from the response of [List Zoom Rooms](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms/listzoomrooms) API.
224 */
225 pub async fn get_zr_profile(
226 &self,
227 room_id: &str,
228 ) -> ClientResult<crate::Response<crate::types::GetZrProfileResponse>> {
229 let url = self.client.url(
230 &format!("/rooms/{}", crate::progenitor_support::encode_path(room_id),),
231 None,
232 );
233 self.client
234 .get(
235 &url,
236 crate::Message {
237 body: None,
238 content_type: None,
239 },
240 )
241 .await
242 }
243 /**
244 * Delete a Zoom Room.
245 *
246 * This function performs a `DELETE` to the `/rooms/{roomId}` endpoint.
247 *
248 * [Remove](https://support.zoom.us/hc/en-us/articles/360033432032-Zoom-Room-Device-Profiles#h_e55b2092-c418-4b02-819f-44de51448900) a specific Zoom Room profile from a Zoom account.<br><br>
249 * **Prerequisites:**<br>
250 * * Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>
251 * **Scopes**: `room:write:admin`<br>
252 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
253 *
254 * **Parameters:**
255 *
256 * * `room_id: &str` -- Unique Identifier of a Zoom Room.
257 */
258 pub async fn delete_zoom(
259 &self,
260 room_id: &str,
261 ) -> ClientResult<crate::Response<crate::types::Domains>> {
262 let url = self.client.url(
263 &format!("/rooms/{}", crate::progenitor_support::encode_path(room_id),),
264 None,
265 );
266 self.client
267 .delete(
268 &url,
269 crate::Message {
270 body: None,
271 content_type: None,
272 },
273 )
274 .await
275 }
276 /**
277 * Update a Zoom Room profile.
278 *
279 * This function performs a `PATCH` to the `/rooms/{roomId}` endpoint.
280 *
281 * Update basic information on a specific Zoom Room in a Zoom account.<br>
282 *
283 * **Prerequisites:**<br>
284 * * Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>
285 * **Scopes**: `room:write:admin`<br>
286 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
287 *
288 * **Parameters:**
289 *
290 * * `room_id: &str` -- Unique Identifier of a Zoom Room.
291 */
292 pub async fn update_profile(
293 &self,
294 room_id: &str,
295 body: &crate::types::UpdateRoomProfileRequest,
296 ) -> ClientResult<crate::Response<crate::types::Domains>> {
297 let url = self.client.url(
298 &format!("/rooms/{}", crate::progenitor_support::encode_path(room_id),),
299 None,
300 );
301 self.client
302 .patch(
303 &url,
304 crate::Message {
305 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
306 content_type: Some("application/json".to_string()),
307 },
308 )
309 .await
310 }
311 /**
312 * Get Zoom Room settings.
313 *
314 * This function performs a `GET` to the `/rooms/{roomId}/settings` endpoint.
315 *
316 * Get information on meeting or alert settings applied to a specific Zoom Room. By default, only **Meeting Settings** are returned. To view only **Alert Settings**, specify `alert` as the value of the `setting_type` query parameter.<br>
317 * **Prerequisites:**<br>
318 * * Zoom Room licenses
319 * * Owner or Admin privileges on the Zoom Account.<br>
320 * **Scopes:** `room:read:admin`
321 *
322 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>
323 *
324 * **Parameters:**
325 *
326 * * `setting_type: &str` -- The type of setting that you would like to retrieve.<br> `alert`: Alert Settings applied on the Zoom Rooms Account.<br>
327 * `meeting`: Meeting settings of the Zoom Rooms Account.
328 * * `room_id: &str` -- Unique identifier of the Zoom Room.
329 */
330 pub async fn get_zr_setting(
331 &self,
332 room_id: &str,
333 setting_type: &str,
334 ) -> ClientResult<crate::Response<crate::types::Domains>> {
335 let mut query_args: Vec<(String, String)> = Default::default();
336 if !setting_type.is_empty() {
337 query_args.push(("setting_type".to_string(), setting_type.to_string()));
338 }
339 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
340 let url = self.client.url(
341 &format!(
342 "/rooms/{}/settings?{}",
343 crate::progenitor_support::encode_path(room_id),
344 query_
345 ),
346 None,
347 );
348 self.client
349 .get(
350 &url,
351 crate::Message {
352 body: None,
353 content_type: None,
354 },
355 )
356 .await
357 }
358 /**
359 * Update Zoom Room settings.
360 *
361 * This function performs a `PATCH` to the `/rooms/{roomId}/settings` endpoint.
362 *
363 * Update either meeting or alert settings applied to a specific Zoom Room. To update **Alert Settings**, specify `alert` as the value of the `setting_type` query parameter. To update **Meeting Settings**, specify `meeting` as the value of the `setting_type` query parameter.<br>
364 * **Prerequisites:**<br>
365 * * Zoom Room licenses
366 * * Owner or Admin privileges on the Zoom Account.<br>
367 * **Scopes:** `room:write:admin`<br>
368 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
369 *
370 * **Parameters:**
371 *
372 * * `room_id: &str` -- Unique Identifier of the Zoom Room.
373 * * `setting_type: &str` -- The type of setting that you would like to update.<br> `alert`: Alert Settings applied on the Zoom Room.<br>
374 * `meeting`: Meeting settings of the Zoom Room.<br>
375 * `signage`: Digital signage settings applied on the Zoom Room.
376 */
377 pub async fn update_zr_settings(
378 &self,
379 room_id: &str,
380 setting_type: &str,
381 ) -> ClientResult<crate::Response<()>> {
382 let mut query_args: Vec<(String, String)> = Default::default();
383 if !setting_type.is_empty() {
384 query_args.push(("setting_type".to_string(), setting_type.to_string()));
385 }
386 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
387 let url = self.client.url(
388 &format!(
389 "/rooms/{}/settings?{}",
390 crate::progenitor_support::encode_path(room_id),
391 query_
392 ),
393 None,
394 );
395 self.client
396 .patch(
397 &url,
398 crate::Message {
399 body: None,
400 content_type: Some("application/json".to_string()),
401 },
402 )
403 .await
404 }
405 /**
406 * List Zoom Room devices.
407 *
408 * This function performs a `GET` to the `/rooms/{roomId}/devices` endpoint.
409 *
410 * List information about the devices that are being used for a specific [Zoom Room](https://support.zoom.us/hc/en-us/articles/207483343-Getting-Started-with-Zoom-Rooms) in an account.
411 *
412 * **Prerequisites:**<br>
413 * * Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>
414 * * Account owner or admin permissions.
415 * **Scopes**: `room:read:admin`<br>
416 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`
417 *
418 * **Parameters:**
419 *
420 * * `room_id: &str` -- Unique Identifier of the Zoom Room. This can be retrieved from the response of [List Zoom Rooms](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms/listzoomrooms) API.
421 */
422 pub async fn list_zr_devices(
423 &self,
424 room_id: &str,
425 ) -> ClientResult<crate::Response<crate::types::ListZrDevicesResponse>> {
426 let url = self.client.url(
427 &format!(
428 "/rooms/{}/devices",
429 crate::progenitor_support::encode_path(room_id),
430 ),
431 None,
432 );
433 self.client
434 .get(
435 &url,
436 crate::Message {
437 body: None,
438 content_type: None,
439 },
440 )
441 .await
442 }
443 /**
444 * Change a Zoom Room's location.
445 *
446 * This function performs a `PUT` to the `/rooms/{roomId}/location` endpoint.
447 *
448 * An account owner of a Zoom account can establish a [Zoom Rooms Location Hierarchy](https://support.zoom.us/hc/en-us/articles/115000342983-Zoom-Rooms-Location-Hierarchy) to better organize Zoom Rooms spread accress various location. The location can be structured in a hierarchy with Country being the top-level location, followed by city, campus, building, and floor. Use this API to assign a new location for a Zoom Room. Note that the Zoom Room can be assigned only to the lowest level location available in the hierarchy.
449 * **Prerequisite:**<br>
450 * * Account owner or admin permission
451 * * Zoom Rooms version 4.0 or higher<br>
452 * **Scopes:** `room:write:admin`<br>
453 * **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`
454 *
455 * **Parameters:**
456 *
457 * * `room_id: &str` -- Unique Identifier of the Zoom Room.
458 */
459 pub async fn change_zr_location(
460 &self,
461 room_id: &str,
462 body: &crate::types::ChangeZrLocationRequest,
463 ) -> ClientResult<crate::Response<()>> {
464 let url = self.client.url(
465 &format!(
466 "/rooms/{}/location",
467 crate::progenitor_support::encode_path(room_id),
468 ),
469 None,
470 );
471 self.client
472 .put(
473 &url,
474 crate::Message {
475 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
476 content_type: Some("application/json".to_string()),
477 },
478 )
479 .await
480 }
481 /**
482 * Check-in or check-out of a Zoom Room.
483 *
484 * This function performs a `PATCH` to the `/rooms/{id}/events` endpoint.
485 *
486 * The Zoom Rooms check-in feature helps maximize your room utilization. Use this API to either **check in** and confirm that you are utilizing the room reservation or to **check out** of the room so that the room gets released from the scheduled meeting and will be made available for others to use. Learn more from the [Using the Zoom Rooms check-in feature](https://support.zoom.us/hc/en-us/articles/360001147163-Using-the-Zoom-Rooms-check-in-feature) guide.
487 *
488 * **Prerequisites:**
489 * * [Zoom Rooms](https://support.zoom.us/hc/en-us/articles/207483343-Getting-started-with-Zoom-Rooms#:~:text=Zoom%20Rooms%20is%20a%20software,or%20from%20their%20mobile%20device) must have been set up for use for the account and must be online.
490 * * You must have access to the Calendar Integration APIs (either Microsoft Exchange or Google Calendar APIs) to get calendar information associated with the Room.
491 *
492 * **Scope:** `room:write:admin`
493 *
494 * **Parameters:**
495 *
496 * * `id: &str` -- User's first name.
497 */
498 pub async fn check(
499 &self,
500 id: &str,
501 body: &crate::types::CheckInRoomsRequest,
502 ) -> ClientResult<crate::Response<()>> {
503 let url = self.client.url(
504 &format!(
505 "/rooms/{}/events",
506 crate::progenitor_support::encode_path(id),
507 ),
508 None,
509 );
510 self.client
511 .patch(
512 &url,
513 crate::Message {
514 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
515 content_type: Some("application/json".to_string()),
516 },
517 )
518 .await
519 }
520 /**
521 * List digital signage contents.
522 *
523 * This function performs a `GET` to the `/rooms/digital_signage` endpoint.
524 *
525 * List information about existing [Zoom Rooms digital signage](https://support.zoom.us/hc/en-us/articles/360000030683-Zoom-Rooms-digital-signage) content in a Zoom account.<br> You can also access this information by logging into your Zoom account in the Zoom web portal and visiting the [Digital Signage Content](https://zoom.us/digitalsignage#/) page listed under **Room Management**.
526 *
527 * **Prerequisites:**
528 * * Pro or a higher account with Zoom Rooms.
529 * * Existing content files or folder in [Digital Signage Content](https://zoom.us/digitalsignage#/) page.
530 *
531 *
532 *
533 *
534 * **Parameters:**
535 *
536 * * `type_: &str` -- Specify the type of digital signane resource. The value can be one of the following:
537 * * `content`: Returns information about content files.
538 * * `folder`: Returns information about the folder where the content files are located.
539 * * `folder_id: &str` -- Unique identifier of the folder where the content is located. Provide this field if you would like to filter the response by contents that are only available in a specific folder.
540 * * `page_size: i64` -- The number of records returned within a single API call.
541 * * `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.
542 */
543 pub async fn list_digital_signage_content(
544 &self,
545 type_: &str,
546 folder_id: &str,
547 page_size: i64,
548 next_page_token: &str,
549 ) -> ClientResult<crate::Response<Vec<crate::types::Site>>> {
550 let mut query_args: Vec<(String, String)> = Default::default();
551 if !folder_id.is_empty() {
552 query_args.push(("folder_id".to_string(), folder_id.to_string()));
553 }
554 if !next_page_token.is_empty() {
555 query_args.push(("next_page_token".to_string(), next_page_token.to_string()));
556 }
557 if page_size > 0 {
558 query_args.push(("page_size".to_string(), page_size.to_string()));
559 }
560 if !type_.is_empty() {
561 query_args.push(("type".to_string(), type_.to_string()));
562 }
563 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
564 let url = self
565 .client
566 .url(&format!("/rooms/digital_signage?{}", query_), None);
567 let resp: crate::Response<crate::types::ListDigitalSignageContentResponse> = self
568 .client
569 .get(
570 &url,
571 crate::Message {
572 body: None,
573 content_type: None,
574 },
575 )
576 .await?;
577
578 // Return our response data.
579 Ok(crate::Response::new(
580 resp.status,
581 resp.headers,
582 resp.body.contents.to_vec(),
583 ))
584 }
585 /**
586 * List digital signage contents.
587 *
588 * This function performs a `GET` to the `/rooms/digital_signage` endpoint.
589 *
590 * As opposed to `list_digital_signage_content`, this function returns all the pages of the request at once.
591 *
592 * List information about existing [Zoom Rooms digital signage](https://support.zoom.us/hc/en-us/articles/360000030683-Zoom-Rooms-digital-signage) content in a Zoom account.<br> You can also access this information by logging into your Zoom account in the Zoom web portal and visiting the [Digital Signage Content](https://zoom.us/digitalsignage#/) page listed under **Room Management**.
593 *
594 * **Prerequisites:**
595 * * Pro or a higher account with Zoom Rooms.
596 * * Existing content files or folder in [Digital Signage Content](https://zoom.us/digitalsignage#/) page.
597 *
598 *
599 *
600 */
601 pub async fn list_all_digital_signage_content(
602 &self,
603 type_: &str,
604 folder_id: &str,
605 ) -> ClientResult<crate::Response<Vec<crate::types::Site>>> {
606 let mut query_args: Vec<(String, String)> = Default::default();
607 if !folder_id.is_empty() {
608 query_args.push(("folder_id".to_string(), folder_id.to_string()));
609 }
610 if !type_.is_empty() {
611 query_args.push(("type".to_string(), type_.to_string()));
612 }
613 let query_ = serde_urlencoded::to_string(&query_args).unwrap();
614 let url = self
615 .client
616 .url(&format!("/rooms/digital_signage?{}", query_), None);
617 let crate::Response::<crate::types::ListDigitalSignageContentResponse> {
618 mut status,
619 mut headers,
620 mut body,
621 } = self
622 .client
623 .get(
624 &url,
625 crate::Message {
626 body: None,
627 content_type: None,
628 },
629 )
630 .await?;
631
632 let mut contents = body.contents;
633 let mut page = body.next_page_token;
634
635 // Paginate if we should.
636 while !page.is_empty() {
637 // Check if we already have URL params and need to concat the token.
638 if !url.contains('?') {
639 crate::Response::<crate::types::ListDigitalSignageContentResponse> {
640 status,
641 headers,
642 body,
643 } = self
644 .client
645 .get(
646 &format!("{}?next_page_token={}", url, page),
647 crate::Message {
648 body: None,
649 content_type: None,
650 },
651 )
652 .await?;
653 } else {
654 crate::Response::<crate::types::ListDigitalSignageContentResponse> {
655 status,
656 headers,
657 body,
658 } = self
659 .client
660 .get(
661 &format!("{}&next_page_token={}", url, page),
662 crate::Message {
663 body: None,
664 content_type: None,
665 },
666 )
667 .await?;
668 }
669
670 contents.append(&mut body.contents);
671
672 if !body.next_page_token.is_empty() && body.next_page_token != page {
673 page = body.next_page_token.to_string();
674 } else {
675 page = "".to_string();
676 }
677 }
678
679 // Return our response data.
680 Ok(crate::Response::new(status, headers, contents))
681 }
682 /**
683 * Update E911 digital signage.
684 *
685 * This function performs a `PATCH` to the `/rooms/events` endpoint.
686 *
687 * Display or hide E911 emergency alert text content from [Zoom Rooms digital signage](https://support.zoom.us/hc/en-us/articles/360000030683-Zoom-Rooms-digital-signage).
688 *
689 * **Scope:** `room:write:admin`
690 *
691 * **Prerequisites:**<br>
692 * * [Zoom Rooms](https://zoom.us/zoomrooms/software) 5.3.0 or higher
693 * * Zoom Rooms digital signage must be [enabled](https://support.zoom.us/hc/en-us/articles/360000030683-Zoom-Rooms-Digital-Signage#h_767fbb33-82a8-45a8-8392-a1bfa9687edd)
694 *
695 */
696 pub async fn manage_e_91_1signage(
697 &self,
698 ) -> ClientResult<crate::Response<crate::types::ManageE911SignageResponse>> {
699 let url = self.client.url("/rooms/events", None);
700 self.client
701 .patch(
702 &url,
703 crate::Message {
704 body: None,
705 content_type: Some("application/json".to_string()),
706 },
707 )
708 .await
709 }
710}