# `ApifyClient.API.RequestQueues`
[🔗](https://github.com/social-growth-studio/apify-client-ex/blob/v1.0.0/lib/apify_client/api/request_queues.ex#L1)

Provides API endpoints related to api/request queues

# `create`

```elixir
@spec create(opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.RequestQueueResource.t()}
  | {:error, ApifyClient.Error.t()}
```

Create request queue

Creates a request queue and returns its object.
Keep in mind that requests stored under unnamed queue follows [data
retention period](https://docs.apify.com/platform/storage#data-retention).

It creates a queue of given name if the parameter name is used. If a queue
with the given name already exists then the endpoint returns
its object.

## Options

  * `name`: Custom unique name to easily identify the queue in the future.

# `delete`

```elixir
@spec delete(queue_id :: String.t(), opts :: keyword()) ::
  :ok | {:error, ApifyClient.Error.t()}
```

Delete request queue

Deletes given queue.

# `get`

```elixir
@spec get(queue_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.RequestQueueResource.t()}
  | {:error, ApifyClient.Error.t()}
```

Get request queue

Returns queue object for given queue ID.

# `list`

```elixir
@spec list(opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.ListOfRequestQueues.t()}
  | {:error, ApifyClient.Error.t()}
```

Get list of request queues

Lists all of a user's request queues. The response is a JSON array of
objects, where each object
contains basic information about one queue.

By default, the objects are sorted by the `createdAt` field in ascending order,
therefore you can use pagination to incrementally fetch all queues while new
ones are still being created. To sort them in descending order, use `desc=1`
parameter. The endpoint supports pagination using `limit` and `offset`
parameters and it will not return more than 1000
array elements.

## Options

  * `offset`: Number of items that should be skipped at the start. The default value is `0`.
    
  * `limit`: Maximum number of items to return. The default value as well as the maximum is `1000`.
    
  * `desc`: If `true` or `1` then the objects are sorted by the `createdAt` field in
    descending order. By default, they are sorted in ascending order.
    
  * `unnamed`: If `true` or `1` then all the storages are returned. By default, only
    named storages are returned.
    
  * `ownership`: Filter by ownership. If this parameter is omitted, all accessible request queues are returned.
    
    - `ownedByMe`: Return only request queues owned by the user.
    - `sharedWithMe`: Return only request queues shared with the user by other users.
    

# `update`

```elixir
@spec update(queue_id :: String.t(), body :: map(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.RequestQueueResource.t()}
  | {:error, ApifyClient.Error.t()}
```

Update request queue

Updates a request queue's name and general resource access level using a value specified by a JSON object
passed in the PUT payload.

The response is the updated request queue object, as returned by the
[Get request queue](https://docs.apify.com/api/v2/request-queue-get) API endpoint.

## Request Body

**Content Types**: `application/json`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
