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§
- Google
Indexing Api - API Access Endpoint
- Response
Google Indexing Batch - Google Index Batch Response
- Response
UrlNotification - Response Url Notification
- Response
UrlNotification Metadata - Response Url Notification Metadata
- UrlNotifications
Api - urlNotifications API
Enums§
- UrlNotifications
Type - URL Notification Type UPDATE or DELETE