box-open-sdk 0.3.1

Box API client for Rust (open source, community, punk rock) — typed models, async managers, and a reqwest runtime with retry, backoff, and token refresh.
Documentation
<!-- Generated by box-gantry. DO NOT EDIT. -->
# CommentsManager

Reach these methods through the `comments` field on `client::Client`.

## list_file

`GET /files/{file_id}/comments`

| Parameter | In | Type | Required |
|---|---|---|---|
| `file_id` | path | `String` | yes |
| `fields` | query | `Vec<String>` | no |
| `limit` | query | `i64` | no |
| `offset` | query | `i64` | no |

**Returns:** `Comments`

**Example**

```rust
let mut pages = client.comments.list_file("FILE_ID".to_string(), None);
while let Some(item) = pages.next().await {
    // use item
}
```

Paginated — `list_file(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).

## get

`GET /comments/{comment_id}`

| Parameter | In | Type | Required |
|---|---|---|---|
| `comment_id` | path | `String` | yes |
| `fields` | query | `Vec<String>` | no |

**Returns:** `CommentFull`

**Example**

```rust
let result = client.comments.get("COMMENT_ID".to_string(), None).await?;
```

## update

`PUT /comments/{comment_id}`

| Parameter | In | Type | Required |
|---|---|---|---|
| `comment_id` | path | `String` | yes |
| `fields` | query | `Vec<String>` | no |

**Request body** (`application/json`): `CommentUpdateRequest`

**Returns:** `CommentFull`

**Example**

```rust
let result = client.comments.update("COMMENT_ID".to_string(), schemas::CommentUpdateRequest { /* … */ }, None).await?;
```

## delete

`DELETE /comments/{comment_id}`

| Parameter | In | Type | Required |
|---|---|---|---|
| `comment_id` | path | `String` | yes |

**Returns:** no content

**Example**

```rust
client.comments.delete("COMMENT_ID".to_string()).await?;
```

## create

`POST /comments`

| Parameter | In | Type | Required |
|---|---|---|---|
| `fields` | query | `Vec<String>` | no |

**Request body** (`application/json`): `CommentCreateRequest`

**Returns:** `CommentFull`

**Example**

```rust
let result = client.comments.create(schemas::CommentCreateRequest { /* … */ }, None).await?;
```