rust-trend

rust-trend

This lib is a work in progress

Overview

Unofficial Rust API for interacting with Google Trend

Documentation

Example

First, add the dependency to your cargo.toml: toml [dependencies] rtrend = "0.1.2"

Then build a client and send the reqwest you want : ```rust use rtrend::{Keyword, Country, Client, RegionInterest};

let country = Country::new("US"); let keywords = Keywords::new(vec!["Instagram","Facebook"]); let client = Client::new(keywords, country).build();

// Then select the data you want. The interest of your keywords filtered by region for example: let regioninterest = RegionInterest::new(client).get(); println!("{}", regioninterest);

// Result : //{ // "default": { // "geoMapData": [ // { // "formattedValue": [ // "100" // ], // "geoCode": "US-CA", // "geoName": "California", // "hasData": [ // true // ], // "maxValueIndex": 0, // "value": [ // 100 // ] // }, // // ... //
// { // "formattedValue": [ // "46" // ], // "geoCode": "US-SD", // "geoName": "South Dakota", // "hasData": [ // true // ], // "maxValueIndex": 0, // "value": [ // 46 // ] // } // ] // } //}

```

More example

Roadmap

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.