Crate google_indexing_api

Source
Expand description

§GoogleIndexingAPI

This is a general-purpose library for using the GoogleIndex API.

Since it defines the structures needed for the API, it can simplify API access.

※ Token generation is not supported in this API.

§Batch API

With the batch API, you can make multiple publish requests in bulk. When processing a large number of job listings consecutively, batch requests are processed faster.

use google_indexing_api::{GoogleIndexingApi, ResponseGoogleIndexingBatch, UrlNotificationsType};
async fn example_batch(token: &str)   {
    GoogleIndexingApi::url_notifications()
        .batch(
            token,
            vec![
                "http://!example.com/widgets/1".to_string(),
                "http://!example.com/widgets/2".to_string(),
            ],
            UrlNotificationsType::UPDATED,
        )
        .await;
}

§Metadata API

The metadata API allows you to check the status of a URL notification.

use google_indexing_api::{GoogleIndexingApi, ResponseUrlNotificationMetadata};
 async fn example_metadata(token: &str) {
    GoogleIndexingApi::url_notifications()
        .get_metadata(
            token,
            "http://!example.com/widgets/1",
        )
        .await;
}

Structs§

GoogleIndexingApi
API Access Endpoint
ResponseGoogleIndexingBatch
Google Index Batch Response
ResponseUrlNotification
Response Url Notification
ResponseUrlNotificationMetadata
Response Url Notification Metadata
UrlNotificationsApi
urlNotifications API

Enums§

UrlNotificationsType
URL Notification Type UPDATE or DELETE