pub struct Articles<'a> { /* private fields */ }Expand description
Article endpoints: client.articles().
Implementations§
Source§impl Articles<'_>
impl Articles<'_>
Sourcepub async fn search(&self, params: &SearchParams) -> Result<ArticlePage>
pub async fn search(&self, params: &SearchParams) -> Result<ArticlePage>
One page of a search (POST /v3/articles/search). Only the keys you set are sent.
Sourcepub fn search_all(
&self,
params: SearchParams,
options: SearchAllOptions,
) -> Result<SearchAllResult>
pub fn search_all( &self, params: SearchParams, options: SearchAllOptions, ) -> Result<SearchAllResult>
Every article of a search, page by page, up to max_pages (default Config::max_pages).
The body is frozen at this call; later pages only add the cursor. Each page is one
call and costs quota. Errors arrive during iteration; a monthly 429 ends it at once.
The parameters are checked here, before any request.
Sourcepub async fn get(
&self,
id: &str,
options: &GetArticleOptions,
) -> Result<Article>
pub async fn get( &self, id: &str, options: &GetArticleOptions, ) -> Result<Article>
One article by id (GET /v3/articles/{id}). A miss is Error::Api with api_kind
not_found; articles indexed before the id rollout are reachable only by link.
Sourcepub async fn get_by_link(
&self,
link: &str,
options: &GetArticleOptions,
) -> Result<Article>
pub async fn get_by_link( &self, link: &str, options: &GetArticleOptions, ) -> Result<Article>
One article by link (GET /v3/articles/by-link). The link must match exactly.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Articles<'a>
impl<'a> !UnwindSafe for Articles<'a>
impl<'a> Forget for Articles<'a>
impl<'a> Freeze for Articles<'a>
impl<'a> Move for Articles<'a>
impl<'a> Send for Articles<'a>
impl<'a> Sync for Articles<'a>
impl<'a> Unpin for Articles<'a>
impl<'a> UnsafeUnpin for Articles<'a>where
&'a Arc<Inner>: UnsafeUnpin,
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