mikrotik 0.0.8

REST API Wrapper for Mikrotik API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub use crate::ip::types::Address;
use crate::{Client, ClientError};

/// list all configurd ipv4 addresses
pub async fn list(client: &mut Client) -> Result<Vec<Address>, ClientError> {
    let url = format!("{}/address", super::BASE);

    client.execute_get::<Vec<Address>>(&url).await
}

/// get details of a specific ipv4 address
pub async fn get(client: &mut Client, aid: &str) -> Result<Address, ClientError> {
    let url = format!("{}/address/{}", super::BASE, aid);

    client.execute_get::<Address>(&url).await
}