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
        .role()
        .delete(sideko_rest_api::resources::role::DeleteRequest {
            id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".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
        .role()
        .list(sideko_rest_api::resources::role::ListRequest {
            object_id: Some("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string()),
            object_type: Some(sideko_rest_api::models::ObjectTypeEnum::ApiProject),
            user_id: Some("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string()),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_list_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
        .role()
        .list(sideko_rest_api::resources::role::ListRequest {
            ..Default::default()
        })
        .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
        .role()
        .create(sideko_rest_api::resources::role::CreateRequest {
            object_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
            object_type: sideko_rest_api::models::ObjectTypeEnum::ApiProject,
            role_definition_id: sideko_rest_api::models::RoleDefinitionIdEnum::ApiProjectAdmin,
            user_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}