Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Updated Title Roles to Autocomplete #32

Merged
merged 5 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://i.imgur.com/S7DkZtr.png" width="250" alt="People Data Labs Logo">
<img src="https://www.peopledatalabs.com/images/company-logo.png" style="background-color: white; padding: 5px 10px;" width="250" alt="People Data Labs Logo">
</p>
<h1 align="center">People Data Labs Rust Client</h1>
<p align="center">Official Rust client for the People Data Labs API.</p>
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions examples/autocompete/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/ip/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/api/autocomplete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/api/company.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
4 changes: 2 additions & 2 deletions src/api/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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");
}
}
3 changes: 3 additions & 0 deletions src/models/autocomplete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>,
/// If true, the response will return updated title tags
#[serde(rename = "updated_title_roles", default)]
pub updated_title_roles: Option<bool>,
}

#[derive(Debug, Serialize, Deserialize)]
Expand Down
Loading