From c9efff7e1e3eb4c81e2c344fc10a6593b3392fbc Mon Sep 17 00:00:00 2001 From: Varun Villait Date: Wed, 18 Dec 2024 10:19:34 -0700 Subject: [PATCH] Add Updated Title Roles to Autocomplete (#32) * add support for utr in autocomplete * update version * update test * fix test * update ip --- Cargo.toml | 2 +- README.md | 4 ++-- examples/autocompete/main.rs | 1 + examples/ip/main.rs | 2 +- src/api/autocomplete.rs | 1 + src/api/company.rs | 2 +- src/api/ip.rs | 4 ++-- src/models/autocomplete.rs | 3 +++ 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 134b378..340bc9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peopledatalabs" -version = "2.2.0" +version = "2.3.0" edition = "2021" description = "A Rust client for the People Data Labs API" documentation = "https://docs.peopledatalabs.com/docs/rust-sdk" diff --git a/README.md b/README.md index 944b60b..44abd7e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-People Data Labs Logo +People Data Labs Logo

People Data Labs Rust Client

Official Rust client for the People Data Labs API.

@@ -285,7 +285,7 @@ let results = client.skill.get(params); ```rust let mut ip_base_params = IPBaseParams::default(); -ip_base_params.ip = Some("72.212.42.169".to_string()); +ip_base_params.ip = Some("72.212.42.228".to_string()); let params = IPParams { base_params: None, ip_base_params, diff --git a/examples/autocompete/main.rs b/examples/autocompete/main.rs index 2c85fcc..a7b62dd 100644 --- a/examples/autocompete/main.rs +++ b/examples/autocompete/main.rs @@ -6,6 +6,7 @@ fn main() { field: "text".to_string(), text: Some("full".to_string()), titlecase: Some(false), + updated_title_roles: Some(false), }; let autocomplete_params = AutocompleteParams { base_params: None, diff --git a/examples/ip/main.rs b/examples/ip/main.rs index e82f659..24116b6 100644 --- a/examples/ip/main.rs +++ b/examples/ip/main.rs @@ -3,7 +3,7 @@ use peopledatalabs::{IPBaseParams, IPParams, PDL}; fn main() { let client = PDL::new(); let mut ip_base_params = IPBaseParams::default(); - ip_base_params.ip = Some("72.212.42.169".to_string()); + ip_base_params.ip = Some("72.212.42.228".to_string()); let params = IPParams { base_params: None, ip_base_params, diff --git a/src/api/autocomplete.rs b/src/api/autocomplete.rs index 39da55a..ad93439 100644 --- a/src/api/autocomplete.rs +++ b/src/api/autocomplete.rs @@ -45,6 +45,7 @@ mod tests { field: "school".to_string(), text: Some("stanf".to_string()), titlecase: Some(false), + updated_title_roles: Some(false), }; let autocomplete_params = AutocompleteParams { diff --git a/src/api/company.rs b/src/api/company.rs index dd30c33..de652b8 100644 --- a/src/api/company.rs +++ b/src/api/company.rs @@ -169,6 +169,6 @@ mod tests { let resp = company.search(search_params).expect("ERROR"); assert_eq!(resp.status, 200); - assert_eq!(resp.total, Some(1)); + assert_eq!(resp.total, Some(2)); } } diff --git a/src/api/ip.rs b/src/api/ip.rs index 86d018d..c86b13f 100644 --- a/src/api/ip.rs +++ b/src/api/ip.rs @@ -33,7 +33,7 @@ mod tests { base_params.pretty = Some(true); let mut ip_base_params = IPBaseParams::default(); - ip_base_params.ip = Some("72.212.42.169".to_string()); + ip_base_params.ip = Some("72.212.42.228".to_string()); let ip_params = IPParams { base_params: Some(base_params), @@ -43,6 +43,6 @@ mod tests { let resp = ip.get(ip_params).expect("ERROR"); assert_eq!(resp.status, 200); - assert_eq!(resp.data.ip.address, "72.212.42.169"); + assert_eq!(resp.data.ip.address, "72.212.42.228"); } } diff --git a/src/models/autocomplete.rs b/src/models/autocomplete.rs index 0607440..fcd3ff6 100644 --- a/src/models/autocomplete.rs +++ b/src/models/autocomplete.rs @@ -13,6 +13,9 @@ pub struct AutocompleteBaseParams { /// Setting titlecase to true will titlecase the data in 200 responses #[serde(rename = "titlecase", skip_serializing_if = "Option::is_none")] pub titlecase: Option, + /// If true, the response will return updated title tags + #[serde(rename = "updated_title_roles", default)] + pub updated_title_roles: Option, } #[derive(Debug, Serialize, Deserialize)]