[−][src]Struct apify_client::client::ApifyClient
Fields
optional_token: Option<String>
client: Client
base_path: String
base_time_to_retry: u32
debug_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]
&self,
dataset_id_or_name: &IdOrName
) -> SimpleBuilder<'_, Dataset>
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]
&self,
dataset_id_or_name: &IdOrName
) -> SimpleBuilder<'_, Dataset>
Requires API token
pub fn delete_dataset(
&self,
dataset_id_or_name: &IdOrName
) -> SimpleBuilder<'_, NoContent>
[src]
&self,
dataset_id_or_name: &IdOrName
) -> SimpleBuilder<'_, NoContent>
Requires API token
pub fn put_items<T: Serialize>(
&self,
dataset_id_or_name: &IdOrName,
items: &[T]
) -> SimpleBuilder<'_, NoContent>
[src]
&self,
dataset_id_or_name: &IdOrName,
items: &[T]
) -> SimpleBuilder<'_, NoContent>
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]
&'_ self,
url: &'_ str,
method: &'_ Method,
body: &'_ Option<Vec<u8>>,
headers: &'_ Option<HeaderMap>
) -> Result<Response, ApifyClientError>
Auto Trait Implementations
impl !RefUnwindSafe for ApifyClient
impl Send for ApifyClient
impl Sync for ApifyClient
impl Unpin for ApifyClient
impl !UnwindSafe for ApifyClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,