sideko_rest_api 0.9.2

Rust API Client
Documentation
# org

## Module Functions

### Get Organization <a name="get"></a>

Retrieves the organization of the current authenticated user

**API Endpoint**: `GET /organization`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client.org().get().await;
```

#### Response

##### Type

[Organization](/src/models/organization.rs)

##### Example

```rust
Organization {features: OrganizationFeatures {allow_sdk_cli: true, allow_sdk_csharp: true, allow_sdk_go: true, allow_sdk_java: true, allow_sdk_python: true, allow_sdk_rust: true, allow_sdk_tests: true, allow_sdk_typescript: true, is_free: true, max_api_projects: 123, max_doc_projects: 123, max_mock_servers: 123, max_sdk_api_methods: 123, max_service_accounts: 123, max_teammates: 123}, id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(), name: "string".to_string(), subdomain: "string".to_string()}
```

### Create Organization <a name="create"></a>

**API Endpoint**: `POST /organization`

#### Parameters

| Parameter      | Required | Description | Example                         |
| -------------- | :------: | ----------- | ------------------------------- |
| `name`         |    ✓     |             | `"My Organization".to_string()` |
| `subdomain`    |    ✓     |             | `"my-org".to_string()`          |
| `sdk_language` |    ✗     |             | `SdkLanguageEnum::Csharp`       |

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .org()
    .create(sideko_rest_api::resources::org::CreateRequest {
        name: "My Organization".to_string(),
        subdomain: "my-org".to_string(),
        ..Default::default()
    })
    .await;
```

#### Response

##### Type

[OrganizationWithRedirect](/src/models/organization_with_redirect.rs)

##### Example

```rust
OrganizationWithRedirect {organization: Organization {features: OrganizationFeatures {allow_sdk_cli: true, allow_sdk_csharp: true, allow_sdk_go: true, allow_sdk_java: true, allow_sdk_python: true, allow_sdk_rust: true, allow_sdk_tests: true, allow_sdk_typescript: true, is_free: true, max_api_projects: 123, max_doc_projects: 123, max_mock_servers: 123, max_sdk_api_methods: 123, max_service_accounts: 123, max_teammates: 123}, id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(), name: "string".to_string(), subdomain: "string".to_string()}, redirect_to: "string".to_string()}
```