Skip to content

Commit c9efff7

Browse files
authored
Add Updated Title Roles to Autocomplete (#32)
* add support for utr in autocomplete * update version * update test * fix test * update ip
1 parent b3eacf2 commit c9efff7

File tree

8 files changed

+12
-7
lines changed

8 files changed

+12
-7
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "peopledatalabs"
3-
version = "2.2.0"
3+
version = "2.3.0"
44
edition = "2021"
55
description = "A Rust client for the People Data Labs API"
66
documentation = "https://docs.peopledatalabs.com/docs/rust-sdk"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="https://i.imgur.com/S7DkZtr.png" width="250" alt="People Data Labs Logo">
2+
<img src="https://www.peopledatalabs.com/images/company-logo.png" style="background-color: white; padding: 5px 10px;" width="250" alt="People Data Labs Logo">
33
</p>
44
<h1 align="center">People Data Labs Rust Client</h1>
55
<p align="center">Official Rust client for the People Data Labs API.</p>
@@ -285,7 +285,7 @@ let results = client.skill.get(params);
285285

286286
```rust
287287
let mut ip_base_params = IPBaseParams::default();
288-
ip_base_params.ip = Some("72.212.42.169".to_string());
288+
ip_base_params.ip = Some("72.212.42.228".to_string());
289289
let params = IPParams {
290290
base_params: None,
291291
ip_base_params,

examples/autocompete/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ fn main() {
66
field: "text".to_string(),
77
text: Some("full".to_string()),
88
titlecase: Some(false),
9+
updated_title_roles: Some(false),
910
};
1011
let autocomplete_params = AutocompleteParams {
1112
base_params: None,

examples/ip/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use peopledatalabs::{IPBaseParams, IPParams, PDL};
33
fn main() {
44
let client = PDL::new();
55
let mut ip_base_params = IPBaseParams::default();
6-
ip_base_params.ip = Some("72.212.42.169".to_string());
6+
ip_base_params.ip = Some("72.212.42.228".to_string());
77
let params = IPParams {
88
base_params: None,
99
ip_base_params,

src/api/autocomplete.rs

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ mod tests {
4545
field: "school".to_string(),
4646
text: Some("stanf".to_string()),
4747
titlecase: Some(false),
48+
updated_title_roles: Some(false),
4849
};
4950

5051
let autocomplete_params = AutocompleteParams {

src/api/company.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,6 @@ mod tests {
169169
let resp = company.search(search_params).expect("ERROR");
170170

171171
assert_eq!(resp.status, 200);
172-
assert_eq!(resp.total, Some(1));
172+
assert_eq!(resp.total, Some(2));
173173
}
174174
}

src/api/ip.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mod tests {
3333
base_params.pretty = Some(true);
3434

3535
let mut ip_base_params = IPBaseParams::default();
36-
ip_base_params.ip = Some("72.212.42.169".to_string());
36+
ip_base_params.ip = Some("72.212.42.228".to_string());
3737

3838
let ip_params = IPParams {
3939
base_params: Some(base_params),
@@ -43,6 +43,6 @@ mod tests {
4343
let resp = ip.get(ip_params).expect("ERROR");
4444

4545
assert_eq!(resp.status, 200);
46-
assert_eq!(resp.data.ip.address, "72.212.42.169");
46+
assert_eq!(resp.data.ip.address, "72.212.42.228");
4747
}
4848
}

src/models/autocomplete.rs

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ pub struct AutocompleteBaseParams {
1313
/// Setting titlecase to true will titlecase the data in 200 responses
1414
#[serde(rename = "titlecase", skip_serializing_if = "Option::is_none")]
1515
pub titlecase: Option<bool>,
16+
/// If true, the response will return updated title tags
17+
#[serde(rename = "updated_title_roles", default)]
18+
pub updated_title_roles: Option<bool>,
1619
}
1720

1821
#[derive(Debug, Serialize, Deserialize)]

0 commit comments

Comments
 (0)