sideko_rest_api 0.9.2

Rust API Client
Documentation
# doc.version.page

## Module Functions

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

**API Endpoint**: `GET /doc_project/{doc_name}/version/{doc_version}/page/{page_id}`

#### Parameters

| Parameter     | Required | Description | Example                                                            |
| ------------- | :------: | ----------- | ------------------------------------------------------------------ |
| `doc_name`    ||             | `"my-project".to_string()`                                         |
| `doc_version` ||             | `IdOrInt::Str("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string())` |
| `page_id`     ||             | `"3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".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()
    .version()
    .page()
    .get(sideko_rest_api::resources::doc::version::page::GetRequest {
        doc_name: "my-project".to_string(),
        doc_version: sideko_rest_api::models::IdOrInt::Str(
            "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
        ),
        page_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
    })
    .await;
```

#### Response

##### Type

[Page](/src/models/page.rs)

##### Example

```rust
Page {ask_ai: true, created_at: "1970-01-01T00:00:00".to_string(), icon: Some("House".to_string()), id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(), label: "string".to_string(), slug: "string".to_string(), table_of_contents: true, type_: ComponentTypePageEnum::Page, mdx: "string".to_string()}
```

### Update Page <a name="patch"></a>

**API Endpoint**: `PATCH /doc_project/{doc_name}/version/{doc_version}/page/{page_id}`

#### Parameters

| Parameter           | Required | Description | Example                                                            |
| ------------------- | :------: | ----------- | ------------------------------------------------------------------ |
| `doc_name`          ||             | `"my-project".to_string()`                                         |
| `doc_version`       ||             | `IdOrInt::Str("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string())` |
| `page_id`           ||             | `"3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string()`               |
| `ask_ai`            ||             | `true`                                                             |
| `content`           ||             | `"string".to_string()`                                             |
| `icon`              ||             | `"House".to_string()`                                              |
| `label`             ||             | `"string".to_string()`                                             |
| `slug`              ||             | `"string".to_string()`                                             |
| `table_of_contents` ||             | `true`                                                             |

#### 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()
    .version()
    .page()
    .patch(sideko_rest_api::resources::doc::version::page::PatchRequest {
        doc_name: "my-project".to_string(),
        doc_version: sideko_rest_api::models::IdOrInt::Str(
            "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
        ),
        page_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
        ..Default::default()
    })
    .await;
```

#### Response

##### Type

[Page](/src/models/page.rs)

##### Example

```rust
Page {ask_ai: true, created_at: "1970-01-01T00:00:00".to_string(), icon: Some("House".to_string()), id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(), label: "string".to_string(), slug: "string".to_string(), table_of_contents: true, type_: ComponentTypePageEnum::Page, mdx: "string".to_string()}
```