pub struct SpideryApp { /* private fields */ }Implementations§
Source§impl SpideryApp
impl SpideryApp
Sourcepub async fn crawl_url_async(
&self,
url: impl AsRef<str>,
options: Option<CrawlOptions>,
) -> Result<CrawlAsyncResponse, SpideryError>
pub async fn crawl_url_async( &self, url: impl AsRef<str>, options: Option<CrawlOptions>, ) -> Result<CrawlAsyncResponse, SpideryError>
Initiates a crawl job for a URL using the Spidery API.
Sourcepub async fn crawl_url(
&self,
url: impl AsRef<str>,
options: impl Into<Option<CrawlOptions>>,
) -> Result<CrawlStatus, SpideryError>
pub async fn crawl_url( &self, url: impl AsRef<str>, options: impl Into<Option<CrawlOptions>>, ) -> Result<CrawlStatus, SpideryError>
Performs a crawl job for a URL using the Spidery API, waiting for the end result. This may take a long time depending on the size of the target page and your options (namely CrawlOptions.limit).
Sourcepub async fn check_crawl_status(
&self,
id: impl AsRef<str>,
) -> Result<CrawlStatus, SpideryError>
pub async fn check_crawl_status( &self, id: impl AsRef<str>, ) -> Result<CrawlStatus, SpideryError>
Checks for the status of a crawl, based on the crawl’s ID. To be used in conjunction with SpideryApp::crawl_url_async.
Source§impl SpideryApp
impl SpideryApp
Source§impl SpideryApp
impl SpideryApp
Sourcepub async fn scrape_url(
&self,
url: impl AsRef<str>,
options: impl Into<Option<ScrapeOptions>>,
) -> Result<Document, SpideryError>
pub async fn scrape_url( &self, url: impl AsRef<str>, options: impl Into<Option<ScrapeOptions>>, ) -> Result<Document, SpideryError>
Scrapes a URL using the Spidery API.
Source§impl SpideryApp
impl SpideryApp
pub fn new(api_key: impl AsRef<str>) -> Result<Self, SpideryError>
pub fn new_selfhosted( api_url: impl AsRef<str>, api_key: Option<impl AsRef<str>>, ) -> Result<Self, SpideryError>
Trait Implementations§
Source§impl Clone for SpideryApp
impl Clone for SpideryApp
Source§fn clone(&self) -> SpideryApp
fn clone(&self) -> SpideryApp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SpideryApp
impl !RefUnwindSafe for SpideryApp
impl Send for SpideryApp
impl Sync for SpideryApp
impl Unpin for SpideryApp
impl !UnwindSafe for SpideryApp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more