[][src]Crate ts3_query

Ts3 query library
Small, bare-metal ts query lib without any callback support currently.

Examples

Simple auth + clients of a server group

use ts3_query::*;

let mut client = QueryClient::new("localhost:10011")?;

client.login("serveradmin", "password")?;
client.select_server_by_port(9987)?;

let group_clients = client.get_servergroup_client_list(7)?;
println!("Got clients in group 7: {:?}",group_clients);

client.logout()?;

Using the raw interface for setting client descriptions.

use ts3_query::*;

let mut client = QueryClient::new("localhost:10011")?;

client.login("serveradmin", "password")?;
client.select_server_by_port(9987)?;

// escape things like string args, not required for clid
// as it's not user input/special chars in this case
let cmd = format!("clientedit clid={} client_description={}",
 7, raw::escape_arg("Some Description!")
);
// we don't expect any value returned
let _ = client.raw_command(&cmd)?;

client.logout()?;

Modules

raw

Module with helpers for raw-calls

Structs

ErrorResponse

Server error response

QueryClient

Ts3 Query client with active connection

Enums

Ts3Error