1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
//! # rust-trend //! //! **This lib is a work in progress** //! //! ## Overview //! Unofficial Rust API for interacting with Google Trend //! //! ## Documentation //! - [Examples Repository]("./examples") //! - [API Documentation](https://docs.rs/rtrend) //! //! ## Example //! //! First, add the dependency to your `cargo.toml`: //! ```toml //! [dependencies] //! rtrend = "0.1.0" //! ``` //! //! 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 region_interest = RegionInterest::new(client).get(); //! println!("{}", region_interest); //! //! // 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 //! - [Simple](./examples/simple.rs) //! - [Region Interest](./examples/region_interest.rs) //! - [Search Interest](./examples/search_interest.rs) //! - [Related Queries](./examples/related_queries.rs) //! - [Related Topics](./examples/related_topics.rs) //! - [Use filters](./examples/filter.rs) //! - [Get response for specific keyword](./examples/select_keyword.rs) //! //! ### Roadmap //! //! - [x] Write documentation & Doc Test //! - [x] Release on crates.io //! - [x] Add examples //! - [ ] Add "TOP" and "RISING" filter //! - [ ] Write more tests //! - [ ] Make async feature (currently using Reqwest::blocking) //! //! //! ### License //! //! Licensed under either of //! //! * Apache License, Version 2.0 //! ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>) //! * MIT license //! ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>) //! //! 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. pub mod client; pub mod region_interest; pub mod search_interest; pub mod related_queries; pub mod related_topics; pub mod category; pub mod country; pub mod keywords; pub mod lang; pub mod property; mod request_handler; mod cookie; mod errors; mod utils; pub use client::Client; pub use region_interest::RegionInterest; pub use search_interest::SearchInterest; pub use related_queries::RelatedQueries; pub use related_topics::RelatedTopics; pub use category::Category; pub use country::Country; pub use keywords::Keywords; pub use lang::Lang; pub use property::Property; pub use cookie::Cookie;