List the review queues of the project. The default queue comes first. The list is paginated. To get the item counts of a queue, use GET /queue/{id}.
require 'moderation_api'
Models = ::ModerationApi::Models
s = ::ModerationApi::ModerationApi.new(
secret_key: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.queue.list(page: 1, page_size: 20)
unless res.object.nil?
# handle response
end| Parameter | Type | Required | Description |
|---|---|---|---|
page |
T.nilable(::Integer) | ➖ | N/A |
page_size |
T.nilable(::Integer) | ➖ | N/A |
project_id |
T.nilable(::String) | ➖ | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. |
T.nilable(Models::Operations::ListQueuesResponse)
| Error Type | Status Code | Content Type |
|---|---|---|
| Models::Errors::BadRequestError | 400 | application/json |
| Models::Errors::AuthenticationError | 401 | application/json |
| Models::Errors::PermissionDeniedError | 403 | application/json |
| Models::Errors::NotFoundError | 404 | application/json |
| Models::Errors::RateLimitError | 429 | application/json |
| Models::Errors::InternalServerError | 500 | application/json |
| Errors::APIError | 4XX, 5XX | */* |
Get a review queue with its item counts. The counts use the filters and the date window of the queue, the same as the dashboard.
require 'moderation_api'
Models = ::ModerationApi::Models
s = ::ModerationApi::ModerationApi.new(
secret_key: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.queue.retrieve(id: '<id>')
unless res.object.nil?
# handle response
end| Parameter | Type | Required | Description |
|---|---|---|---|
id |
::String | ✔️ | The queue ID. |
project_id |
T.nilable(::String) | ➖ | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. |
T.nilable(Models::Operations::GetQueueResponse)
| Error Type | Status Code | Content Type |
|---|---|---|
| Models::Errors::BadRequestError | 400 | application/json |
| Models::Errors::AuthenticationError | 401 | application/json |
| Models::Errors::PermissionDeniedError | 403 | application/json |
| Models::Errors::NotFoundError | 404 | application/json |
| Models::Errors::RateLimitError | 429 | application/json |
| Models::Errors::InternalServerError | 500 | application/json |
| Errors::APIError | 4XX, 5XX | */* |
Get review statistics of a queue for a period: resolved and pending items, the top reviewers and the resolved items per day.
require 'moderation_api'
Models = ::ModerationApi::Models
s = ::ModerationApi::ModerationApi.new(
secret_key: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.queue.get_stats(id: '<id>', within_days: 30)
unless res.object.nil?
# handle response
end| Parameter | Type | Required | Description |
|---|---|---|---|
id |
::String | ✔️ | The queue ID. |
within_days |
T.nilable(::Integer) | ➖ | N/A |
project_id |
T.nilable(::String) | ➖ | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. |
T.nilable(Models::Operations::GetQueueStatsResponse)
| Error Type | Status Code | Content Type |
|---|---|---|
| Models::Errors::BadRequestError | 400 | application/json |
| Models::Errors::AuthenticationError | 401 | application/json |
| Models::Errors::PermissionDeniedError | 403 | application/json |
| Models::Errors::NotFoundError | 404 | application/json |
| Models::Errors::RateLimitError | 429 | application/json |
| Models::Errors::InternalServerError | 500 | application/json |
| Errors::APIError | 4XX, 5XX | */* |