YandexWebmasterClient

Struct YandexWebmasterClient 

Source
pub struct YandexWebmasterClient { /* private fields */ }
Expand description

Client for interacting with the Yandex Webmaster API

Implementations§

Source§

impl YandexWebmasterClient

Source

pub fn oauth_url(client_id: &str) -> String

Create OAuth url to get token

Source

pub async fn new(oauth_token: String) -> Result<Self>

Creates a new Yandex Webmaster API client

§Arguments
  • oauth_token - OAuth token for authentication
§Errors

Returns an error if:

  • The HTTP client cannot be created
  • The user information cannot be fetched
  • The OAuth token is invalid
Source

pub async fn with_client( oauth_token: String, client: ClientBuilder, ) -> Result<Self>

Creates a new Yandex Webmaster API client

§Arguments
  • oauth_token - OAuth token for authentication
  • client - Client builder with preconfigured middleware
§Errors

Returns an error if:

  • The HTTP client cannot be created
  • The user information cannot be fetched
  • The OAuth token is invalid
Source

pub fn user_id(&self) -> i64

Returns the user ID

Source

pub async fn get_hosts(&self) -> Result<Vec<HostInfo>>

List all sites for the user

Source

pub async fn add_host( &self, host_url: &str, verification_type: VerificationType, ) -> Result<AddHostResponse>

Add a new site

Source

pub async fn get_host(&self, host_id: &str) -> Result<FullHostInfo>

Get information about a specific site

Source

pub async fn delete_host(&self, host_id: &str) -> Result<()>

Delete a site

Source

pub async fn get_verification_status( &self, host_id: &str, ) -> Result<HostVerificationResponse>

Get verification status for a site

Source

pub async fn verify_host( &self, host_id: &str, verification_type: ExplicitVerificationType, ) -> Result<HostVerificationResponse>

Initiate verification procedure for a site

Source

pub async fn get_owners(&self, host_id: &str) -> Result<Vec<Owner>>

Get list of verified owners for a site

Source

pub async fn get_host_summary( &self, host_id: &str, ) -> Result<HostSummaryResponse>

Get site summary statistics

Source

pub async fn get_sqi_history( &self, host_id: &str, req: SqiHistoryRequest, ) -> Result<Vec<SqiPoint>>

Get site quality index history

Get popular search queries for a site

Source

pub async fn get_query_analytics( &self, host_id: &str, request: &QueryAnalyticsRequest, ) -> Result<QueryAnalyticsResponse>

Get overall query statistics history

Source

pub async fn get_query_history( &self, host_id: &str, query_id: &str, request: &QueryHistoryRequest, ) -> Result<QueryHistoryResponse>

Get statistics for a specific query

Source

pub async fn get_sitemaps( &self, host_id: &str, request: &GetSitemapsRequest, ) -> Result<SitemapsResponse>

Get list of all sitemap files

Source

pub async fn get_sitemap( &self, host_id: &str, sitemap_id: &str, ) -> Result<SitemapInfo>

Get details of a specific sitemap

Source

pub async fn get_user_sitemaps( &self, host_id: &str, request: &GetUserSitemapsRequest, ) -> Result<UserSitemapsResponse>

Get list of user-submitted sitemaps

Source

pub async fn add_sitemap( &self, host_id: &str, url: &str, ) -> Result<AddSitemapResponse>

Add a new sitemap file

Source

pub async fn get_user_sitemap( &self, host_id: &str, sitemap_id: &str, ) -> Result<UserSitemapInfo>

Get user-submitted sitemap details

Source

pub async fn delete_sitemap( &self, host_id: &str, sitemap_id: &str, ) -> Result<()>

Delete a user-submitted sitemap

Source

pub async fn get_indexing_history( &self, host_id: &str, request: &IndexingHistoryRequest, ) -> Result<IndexingHistoryResponse>

Get indexing history

Source

pub async fn get_indexing_samples( &self, host_id: &str, request: &GetIndexingSamplesRequest, ) -> Result<IndexingSamplesResponse>

Get sample indexed pages

Source

pub async fn get_search_urls_history( &self, host_id: &str, request: &IndexingHistoryRequest, ) -> Result<SearchUrlsHistoryResponse>

Get pages in search history

Source

pub async fn get_search_urls_samples( &self, host_id: &str, request: &GetSearchUrlsSamplesRequest, ) -> Result<SearchUrlsSamplesResponse>

Get sample pages in search

Source

pub async fn get_search_events_history( &self, host_id: &str, request: &IndexingHistoryRequest, ) -> Result<SearchEventsHistoryResponse>

Get page appearance/removal history

Source

pub async fn get_search_events_samples( &self, host_id: &str, request: &GetSearchEventsSamplesRequest, ) -> Result<SearchEventsSamplesResponse>

Get sample page changes

Source

pub async fn get_important_urls( &self, host_id: &str, ) -> Result<ImportantUrlsResponse>

Get list of important URLs

Source

pub async fn get_important_urls_history( &self, host_id: &str, url_param: &str, ) -> Result<ImportantUrlHistoryResponse>

Get important URLs history

Source

pub async fn recrawl_urls( &self, host_id: &str, url: &str, ) -> Result<RecrawlResponse>

Request page recrawl

Source

pub async fn get_recrawl_tasks( &self, host_id: &str, request: &GetRecrawlTasksRequest, ) -> Result<RecrawlTasksResponse>

Get list of recrawl tasks

Source

pub async fn get_recrawl_task( &self, host_id: &str, task_id: &str, ) -> Result<RecrawlTask>

Get recrawl task status

Source

pub async fn get_recrawl_quota( &self, host_id: &str, ) -> Result<RecrawlQuotaResponse>

Get recrawl quota

Get broken internal links samples

Get broken links history

Get external backlinks samples

Get backlinks history

Source

pub async fn get_diagnostics( &self, host_id: &str, ) -> Result<DiagnosticsResponse>

Get site diagnostic report

Trait Implementations§

Source§

impl Clone for YandexWebmasterClient

Source§

fn clone(&self) -> YandexWebmasterClient

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for YandexWebmasterClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more