sideko_rest_api 0.9.2

Rust API Client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[serial_test::serial]
#[tokio::test]
async fn test_invite_202_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
        .user()
        .invite(sideko_rest_api::resources::user::InviteRequest {
            email: "user@example.com".to_string(),
            role_definition_id: sideko_rest_api::models::RoleDefinitionIdEnum::ApiProjectAdmin,
        })
        .await;
    println!("{res:?}");
    assert!(res.is_ok());
}