sideko_rest_api 0.9.2

Rust API Client
Documentation
#[serial_test::serial]
#[tokio::test]
async fn test_delete_204_success_all_params() {
    let mut client = sideko_rest_api::SidekoClient::default()
        .with_api_key_auth("API_KEY")
        .with_cookie_auth("API_KEY")
        .with_environment(sideko_rest_api::Environment::MockServer);
    let res = client
        .api()
        .delete(sideko_rest_api::resources::api::DeleteRequest {
            api_name: "my-project".to_string(),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_list_200_success_all_params() {
    let mut client = sideko_rest_api::SidekoClient::default()
        .with_api_key_auth("API_KEY")
        .with_cookie_auth("API_KEY")
        .with_environment(sideko_rest_api::Environment::MockServer);
    let res = client.api().list().await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_get_200_success_all_params() {
    let mut client = sideko_rest_api::SidekoClient::default()
        .with_api_key_auth("API_KEY")
        .with_cookie_auth("API_KEY")
        .with_environment(sideko_rest_api::Environment::MockServer);
    let res = client
        .api()
        .get(sideko_rest_api::resources::api::GetRequest {
            api_name: "my-project".to_string(),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_create_201_success_all_params() {
    let mut client = sideko_rest_api::SidekoClient::default()
        .with_api_key_auth("API_KEY")
        .with_cookie_auth("API_KEY")
        .with_environment(sideko_rest_api::Environment::MockServer);
    let res = client
        .api()
        .create(sideko_rest_api::resources::api::CreateRequest {
            name: "my-api-spec".to_string(),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_init_201_success_all_params() {
    let mut client = sideko_rest_api::SidekoClient::default()
        .with_api_key_auth("API_KEY")
        .with_cookie_auth("API_KEY")
        .with_environment(sideko_rest_api::Environment::MockServer);
    let res = client
        .api()
        .init(sideko_rest_api::resources::api::InitRequest {
            name: "my-api-spec".to_string(),
            allow_lint_errors: Some(true),
            mock_server_enabled: Some(true),
            notes: Some(
                "<p>This version includes a number of excellent improvements</p>"
                    .to_string(),
            ),
            openapi: sideko_rest_api::UploadFile {
                file_name: "test.pdf".into(),
                content: bytes::Bytes::from_static(b"123"),
            },
            version: Some(
                sideko_rest_api::models::VersionOrBump::VersionBumpEnum(
                    sideko_rest_api::models::VersionBumpEnum::Auto,
                ),
            ),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}