Crates.io | wordstat-rs |
lib.rs | wordstat-rs |
version | 0.1.0 |
source | src |
created_at | 2024-01-13 16:12:37.030922 |
updated_at | 2024-01-13 16:12:37.030922 |
description | A library that allows easy interactions with Yandex Direct API for getting statistics about keyword searches from Wordstat service |
homepage | |
repository | https://github.com/huds2/wordstat-rs |
max_upload_size | |
id | 1098662 |
size | 40,884 |
Rust library for interacting with the Yandex Wordstat API
Create the client:
let client = Client::new("token", "https://api-sandbox.direct.yandex.ru/v4/json/");
Get the list of available regions:
let regions = get_regions(&client).await.unwrap();
Start the report generation:
let request = ReportRequest::new()
.add_phrase("rust")
.add_geo(54); // Geo is optional
let report_id = create_report(&client, &request).await.unwrap();
Getting the list of all available reports and their statuses:
let report_list = get_report_list(&client).await.unwrap();
Get the generated report:
let report = get_report(&client, report_id).await.unwrap();
Delete the reports (you can have more than 5 reports on your account simultaneously):
delete_report(&client, report_id).await.unwrap();