sideko_rest_api 0.9.2

Rust API Client
Documentation
# doc.preview

## Module Functions

### Deletes Preview Password <a name="delete_password"></a>

**API Endpoint**: `DELETE /doc_project/{doc_name}/password`

#### Parameters

| Parameter  | Required | Description | Example                             |
| ---------- | :------: | ----------- | ----------------------------------- |
| `doc_name` ||             | `"my-project".to_string()`          |
| `name`     ||             | `"My customer preview".to_string()` |

#### 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
    .doc()
    .preview()
    .delete_password(sideko_rest_api::resources::doc::preview::DeletePasswordRequest {
        name: "My customer preview".to_string(),
        doc_name: "my-project".to_string(),
    })
    .await;
```

### List Preview Passwords <a name="list_passwords"></a>

Lists generated passwords for a documentation project preview environment

**API Endpoint**: `GET /doc_project/{doc_name}/password`

#### Parameters

| Parameter  | Required | Description | Example                    |
| ---------- | :------: | ----------- | -------------------------- |
| `doc_name` ||             | `"my-project".to_string()` |

#### 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
    .doc()
    .preview()
    .list_passwords(sideko_rest_api::resources::doc::preview::ListPasswordsRequest {
        doc_name: "my-project".to_string(),
    })
    .await;
```

#### Response

##### Type

Vec of [DocPreviewPassword](/src/models/doc_preview_password.rs)

##### Example

```rust
vec![DocPreviewPassword {name: "My customer preview".to_string(), password: "asdfj12124inklwgas123".to_string()}]
```

### Create Preview Password <a name="create_password"></a>

Generate a password to grant access to a private preview environment

**API Endpoint**: `POST /doc_project/{doc_name}/password`

#### Parameters

| Parameter  | Required | Description | Example                             |
| ---------- | :------: | ----------- | ----------------------------------- |
| `doc_name` ||             | `"my-project".to_string()`          |
| `name`     ||             | `"My customer preview".to_string()` |

#### 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
    .doc()
    .preview()
    .create_password(sideko_rest_api::resources::doc::preview::CreatePasswordRequest {
        name: "My customer preview".to_string(),
        doc_name: "my-project".to_string(),
    })
    .await;
```

#### Response

##### Type

[DocPreviewPassword](/src/models/doc_preview_password.rs)

##### Example

```rust
DocPreviewPassword {name: "My customer preview".to_string(), password: "asdfj12124inklwgas123".to_string()}
```