Skip to main content

zoom_api/
rooms_devices.rs

1use crate::Client;
2use crate::ClientResult;
3
4pub struct RoomsDevices {
5    pub client: Client,
6}
7
8impl RoomsDevices {
9    #[doc(hidden)]
10    pub fn new(client: Client) -> Self {
11        RoomsDevices { client }
12    }
13
14    /**
15     * Change Zoom Rooms' app version.
16     *
17     * This function performs a `PUT` to the `/rooms/{roomId}/devices/{deviceId}/app_version` endpoint.
18     *
19     * [Upgrade](https://support.zoom.us/hc/en-us/articles/204675449-Upgrade-or-Downgrade-Zoom-Rooms-Software#h_1751c48a-644e-4a60-b96a-31ec77c616e6) or [downgrade](https://support.zoom.us/hc/en-us/articles/204675449-Upgrade-or-Downgrade-Zoom-Rooms-Software#h_d97349d6-9253-484c-af80-350475026524) the version of Zoom Rooms App installed in your Mac or Windows device.
20     *
21     * **Prerequisites:**<br>
22     * * Pro or a higher account with Zoom Rooms.
23     * * Zoom Rooms software must be installed either on a Mac or a Windows device. This API does not support other devices.
24     *
25     * **Parameters:**
26     *
27     * * `room_id: &str` -- Unique Identifier of the Zoom Room.
28     * * `device_id: &str` -- Unique Identifier of the Mac or the Windows device. The value of this field can be retrieved from the [List Zoom Room Devices API](https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms/listzrdevices).
29     */
30    pub async fn change_zoom_rooms_app_version(
31        &self,
32        room_id: &str,
33        device_id: &str,
34        body: &crate::types::ChangeZoomRoomsAppVersionRequest,
35    ) -> ClientResult<crate::Response<()>> {
36        let url = self.client.url(
37            &format!(
38                "/rooms/{}/devices/{}/app_version",
39                crate::progenitor_support::encode_path(room_id),
40                crate::progenitor_support::encode_path(device_id),
41            ),
42            None,
43        );
44        self.client
45            .put(
46                &url,
47                crate::Message {
48                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
49                    content_type: Some("application/json".to_string()),
50                },
51            )
52            .await
53    }
54}