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
        .doc()
        .delete(sideko_rest_api::resources::doc::DeleteRequest {
            doc_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.doc().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
        .doc()
        .get(sideko_rest_api::resources::doc::GetRequest {
            doc_name: "my-project".to_string(),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_check_preview_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
        .doc()
        .check_preview(sideko_rest_api::resources::doc::CheckPreviewRequest {
            doc_name: "my-project".to_string(),
            pathname: Some("%2Freferences%my-api%2Fmy-get-documentation".to_string()),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_check_preview_200_success_required_only() {
    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
        .doc()
        .check_preview(sideko_rest_api::resources::doc::CheckPreviewRequest {
            doc_name: "my-project".to_string(),
            ..Default::default()
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_patch_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
        .doc()
        .patch(sideko_rest_api::resources::doc::PatchRequest {
            logos: Some(sideko_rest_api::models::UpdateDocProjectLogos {
                dark: Some("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string()),
                favicon: Some("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string()),
                light: Some("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string()),
            }),
            name: Some("my-company-docs".to_string()),
            settings: Some(sideko_rest_api::models::UpdateDocProjectSettings {
                action_button: Some(sideko_rest_api::models::UpdateDocProjectSettingsActionButton {
                    enabled: Some(true),
                    label: Some("string".to_string()),
                    url: Some("http://www.example.com".to_string()),
                }),
                font: Some(sideko_rest_api::models::DocProjectFont {
                    base_size: 123,
                    family: sideko_rest_api::models::FontFamilyEnum::Inter,
                }),
                metadata: Some(sideko_rest_api::models::UpdateDocProjectSettingsMetadata {
                    description: Some("string".to_string()),
                    llms_txt: Some(true),
                    title: Some("string".to_string()),
                }),
                template: Some(
                    sideko_rest_api::models::DocProjectTemplate::ModernTemplate(sideko_rest_api::models::ModernTemplate {
                        dark: sideko_rest_api::models::ModernTheme {
                            primary: "string".to_string(),
                        },
                        light: sideko_rest_api::models::ModernTheme {
                            primary: "string".to_string(),
                        },
                        type_: sideko_rest_api::models::TemplateTypeModernEnum::Modern,
                    }),
                ),
            }),
            doc_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
        .doc()
        .create(sideko_rest_api::resources::doc::CreateRequest {
            font: Some(sideko_rest_api::models::DocProjectFont {
                base_size: 123,
                family: sideko_rest_api::models::FontFamilyEnum::Inter,
            }),
            name: "my-company-docs".to_string(),
            template: Some(
                sideko_rest_api::models::DocProjectTemplate::ModernTemplate(sideko_rest_api::models::ModernTemplate {
                    dark: sideko_rest_api::models::ModernTheme {
                        primary: "string".to_string(),
                    },
                    light: sideko_rest_api::models::ModernTheme {
                        primary: "string".to_string(),
                    },
                    type_: sideko_rest_api::models::TemplateTypeModernEnum::Modern,
                }),
            ),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}