guacamole-client 0.5.1

Rust client library for the Guacamole REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::collections::HashMap;

use crate::client::GuacamoleClient;
use crate::error::Result;

impl GuacamoleClient {
    /// Lists all available languages and their display names.
    ///
    /// This is a public Guacamole endpoint that does not require authentication.
    pub async fn list_languages(&self) -> Result<HashMap<String, String>> {
        let url = self.url_unauth("/api/languages");
        let response = self.http.get(&url).send().await?;
        Self::parse_response(response, "languages").await
    }
}