# GetCollectionsRequest
## Example Usage
```typescript
import { GetCollectionsRequest } from "@lukehagar/plexjs/sdk/models/operations";
import { MediaType } from "@lukehagar/plexjs/sdk/models/shared";
let value: GetCollectionsRequest = {
sectionId: 298004,
mediaQuery: {
type: MediaType.Episode,
sourceType: 2,
sort: "duration:desc,index",
},
};
```
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accepts` | [shared.Accepts](../../../sdk/models/shared/accepts.md) | :heavy_minus_sign: | Indicates the client accepts the indicated media types | |
| `clientIdentifier` | *string* | :heavy_minus_sign: | An opaque identifier unique to the client | abc123 |
| `product` | *string* | :heavy_minus_sign: | The name of the client product | Plex for Roku |
| `version` | *string* | :heavy_minus_sign: | The version of the client application | 2.4.1 |
| `platform` | *string* | :heavy_minus_sign: | The platform of the client | Roku |
| `platformVersion` | *string* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 |
| `device` | *string* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `model` | *string* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X |
| `deviceVendor` | *string* | :heavy_minus_sign: | The device vendor | Roku |
| `deviceName` | *string* | :heavy_minus_sign: | A friendly name for the client | Living Room TV |
| `marketplace` | *string* | :heavy_minus_sign: | The marketplace on which the client application is distributed | googlePlay |
| `sectionId` | *number* | :heavy_check_mark: | Section identifier | |
| `mediaQuery` | [shared.MediaQuery](../../../sdk/models/shared/mediaquery.md) | :heavy_minus_sign: | A querystring-based filtering language used to select subsets of media. Can be provided as an object with typed properties for type safety, or as a string for complex queries with operators and boolean logic.
The query supports:
- Fields: integer, boolean, tag, string, date, language
- Operators: =, !=, ==, !==, <=, >=, >>=, <<= (varies by field type)
- Boolean operators: & (AND), , (OR), push/pop (parentheses), or=1 (explicit OR)
- Sorting: sort parameter with :desc, :nullsLast modifiers
- Grouping: group parameter
- Limits: limit parameter
Examples:
- Object format: `{type: 4, sourceType: 2, title: "24"}` → `type=4&sourceType=2&title=24`
- String format: `type=4&sourceType=2&title==24` - type = 4 AND sourceType = 2 AND title = "24"
- Complex: `push=1&index=1&or=1&rating=2&pop=1&duration=10` - (index = 1 OR rating = 2) AND duration = 10
See [API Info section](#section/API-Info/Media-Queries) for detailed information on building media queries.
| {
"type": 4,
"sourceType": 2,
"sort": "duration:desc,index"
} |