Skip to main content

DatasetCollectionClientAsync

Sub-client for the dataset collection.

Provides methods to manage the dataset collection, e.g. list or create datasets. Obtain an instance via an appropriate method on the ApifyClientAsync class.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params): None
  • Initialize the resource client.


    Parameters

    • keyword-onlybase_url: str

      API base URL.

    • keyword-onlypublic_base_url: str

      Public CDN base URL.

    • keyword-onlyhttp_client: HttpClientAsync

      HTTP client for making requests.

    • keyword-onlyresource_path: str

      Resource endpoint path (e.g., 'actors', 'datasets').

    • keyword-onlyclient_registry: ClientRegistryAsync

      Bundle of client classes for dependency injection.

    • optionalkeyword-onlyresource_id: str | None = None

      Optional resource ID for single-resource clients.

    • optionalkeyword-onlyparams: dict | None = None

      Optional default parameters for all requests.

    Returns None

get_or_create

  • async get_or_create(*, name, schema): Dataset

list


  • Parameters

    • optionalkeyword-onlyunnamed: bool | None = None

      Whether to include unnamed datasets in the list.

    • optionalkeyword-onlylimit: int | None = None

      How many datasets to retrieve.

    • optionalkeyword-onlyoffset: int | None = None

      What dataset to include as first when retrieving the list.

    • optionalkeyword-onlydesc: bool | None = None

      Whether to sort the datasets in descending order based on their modification date.

    Returns ListOfDatasets

    The list of available datasets matching the specified filters.

Properties

resource_id

resource_id: str | None

Get the resource ID.