[][src]Struct apify_client::client::ApifyClient

pub struct ApifyClient {
    pub optional_token: Option<String>,
    pub client: Client,
    pub base_path: String,
    pub base_time_to_retry: u32,
    pub debug_log: bool,
}

Fields

optional_token: Option<String>client: Clientbase_path: Stringbase_time_to_retry: u32debug_log: bool

Implementations

impl ApifyClient[src]

pub fn new(optional_token: Option<String>) -> ApifyClient[src]

Creates a new Apify client with an optional token Be aware that all write operations requires token Some read operations require token, some have optional token and some don't Using a method that requires token without a token in a client will result in panic

pub fn token(&mut self, token: String)[src]

Sets a token on the client

impl ApifyClient[src]

pub fn list_datasets(&self) -> ListDatasetsBuilder<'_>[src]

List datasets of the provided account Requires API token

pub fn create_dataset(&self, dataset_name: &str) -> SimpleBuilder<'_, Dataset>[src]

Requires API token

pub fn get_dataset(
    &self,
    dataset_id_or_name: &IdOrName
) -> SimpleBuilder<'_, Dataset>
[src]

Gets a dataset info object If you provide dataset ID, you don't need a token If you provide username~datasetName, you need a token (otherwise it will panic)

pub fn update_dataset(
    &self,
    dataset_id_or_name: &IdOrName
) -> SimpleBuilder<'_, Dataset>
[src]

Requires API token

pub fn delete_dataset(
    &self,
    dataset_id_or_name: &IdOrName
) -> SimpleBuilder<'_, NoContent>
[src]

Requires API token

pub fn put_items<T: Serialize>(
    &self,
    dataset_id_or_name: &IdOrName,
    items: &[T]
) -> SimpleBuilder<'_, NoContent>
[src]

Requires API token

impl ApifyClient[src]

pub async fn retrying_request<'_, '_, '_, '_, '_>(
    &'_ self,
    url: &'_ str,
    method: &'_ Method,
    body: &'_ Option<Vec<u8>>,
    headers: &'_ Option<HeaderMap>
) -> Result<Response, ApifyClientError>
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.