Crates.io | outline_vpn_api |
lib.rs | outline_vpn_api |
version | 1.0.2 |
source | src |
created_at | 2023-09-21 12:10:04.758923 |
updated_at | 2023-09-21 12:38:57.229668 |
description | API to manage an Outline server. See [Github.com](https://github.com/Jigsaw-Code/outline-server/blob/master/src/shadowbox/server/api.yml). |
homepage | |
repository | |
max_upload_size | |
id | 979391 |
size | 91,710 |
API to manage an Outline server. See getoutline.org.
This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.
org.openapitools.codegen.languages.RustClientCodegen
Add the following to Cargo.toml
:
[dependencies]
outline_vpn_api = "^1.0"
use std::error::Error;
use outline_vpn_api::apis::{server_api::server_get,{configuration::{Configuration, ApiKey}}};
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let client = reqwest::Client::builder()
.danger_accept_invalid_certs(true)
.build()?;
let server_info = server_get(&Configuration {
base_path: "https://1.1.1.1:1466/uGyfMASjkdyC2jJASDvBOg".to_string(),
user_agent: None,
client,
basic_auth: None,
oauth_access_token: None,
bearer_access_token: None,
api_key: Option::from(ApiKey { prefix: None, key: "10E13ED8351223B03DCB375F584D43A1232314F4473242EB4641111395E711".to_string() }) ,
}).await?;
println!("Server Name: {}", server_info.name.unwrap());
println!("Server Id: {}", server_info.server_id.unwrap());
println!("Server Port: {}", server_info.port_for_new_access_keys.unwrap());
Ok(())
// Server Name: vpn.example.com
// Server Id: f2324846-c7d1-4515-bb6f-2sda191a44a6
// Server Port: 9921
}
All URIs are relative to https://myserver/SecretPath
Class | Method | HTTP request | Description |
---|
AccessKeyApi | access_keys_get | GET /access-keys | AccessKeyApi | access_keys_id_data_limit_delete | DELETE /access-keys/{id}/data-limit | AccessKeyApi | access_keys_id_data_limit_put | PUT /access-keys/{id}/data-limit | AccessKeyApi | access_keys_id_delete | DELETE /access-keys/{id} | AccessKeyApi | access_keys_id_get | GET /access-keys/{id} | AccessKeyApi | access_keys_id_name_put | PUT /access-keys/{id}/name | AccessKeyApi | access_keys_post | POST /access-keys | AccessKeyApi | experimental_access_key_data_limit_delete | DELETE /experimental/access-key-data-limit | AccessKeyApi | experimental_access_key_data_limit_put | PUT /experimental/access-key-data-limit | AccessKeyApi | metrics_transfer_get | GET /metrics/transfer | AccessKeyApi | server_access_key_data_limit_delete | DELETE /server/access-key-data-limit | AccessKeyApi | server_access_key_data_limit_put | PUT /server/access-key-data-limit | AccessKeyApi | server_port_for_new_access_keys_put | PUT /server/port-for-new-access-keys | LimitApi | access_keys_id_data_limit_delete | DELETE /access-keys/{id}/data-limit | LimitApi | access_keys_id_data_limit_put | PUT /access-keys/{id}/data-limit | LimitApi | experimental_access_key_data_limit_delete | DELETE /experimental/access-key-data-limit | LimitApi | experimental_access_key_data_limit_put | PUT /experimental/access-key-data-limit | LimitApi | server_access_key_data_limit_delete | DELETE /server/access-key-data-limit | LimitApi | server_access_key_data_limit_put | PUT /server/access-key-data-limit | ServerApi | metrics_enabled_get | GET /metrics/enabled | ServerApi | metrics_enabled_put | PUT /metrics/enabled | ServerApi | name_put | PUT /name | ServerApi | server_get | GET /server | ServerApi | server_hostname_for_access_keys_put | PUT /server/hostname-for-access-keys |
To get access to the crate's generated documentation, use:
cargo doc --open