oxide_api/
updates.rs

1use anyhow::Result;
2
3use crate::Client;
4
5pub struct Updates {
6    pub client: Client,
7}
8
9impl Updates {
10    #[doc(hidden)]
11    pub fn new(client: Client) -> Self {
12        Updates { client }
13    }
14
15    /**
16     * Refresh update data.
17     *
18     * This function performs a `POST` to the `/updates/refresh` endpoint.
19     */
20    pub async fn refresh(&self) -> Result<()> {
21        let url = "/updates/refresh".to_string();
22        self.client.post(&url, None).await
23    }
24}