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

update tests #28

Merged
merged 3 commits into from
May 20, 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
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "peopledatalabs"
version = "2.0.0"
version = "2.0.1"
edition = "2021"
description = "A Rust client for the People Data Labs API"
documentation = "https://docs.peopledatalabs.com/docs/rust-sdk"
Expand All @@ -12,9 +12,9 @@ keywords = ["peopledatalabs", "person-data", "company-data", "sdk", "api"]
categories = ["api-bindings"]

[dependencies]
hyper = { version = "1.0.1", features = ["client", "http1"] }
hyper = { version = "1.3.1", features = ["client", "http1"] }
hyper-tls = "0.6.0"
reqwest = { version = "0.12.2", features = ["json", "blocking"] }
serde = { version = "1.0.180", features = ["derive"] }
serde_json = "1.0.104"
reqwest = { version = "0.12.4", features = ["json", "blocking"] }
serde = { version = "1.0.201", features = ["derive"] }
serde_json = "1.0.117"
serde_urlencoded = "0.7.1"
8 changes: 4 additions & 4 deletions src/api/person.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ mod tests {
base_params.pretty = Some(true);

let mut person_params = PersonParams::default();
person_params.email = Some(vec!["fletcherveronica@example.com".to_string()]);
person_params.email = Some(vec!["reneewillis74@aol.com".to_string()]);

let mut additional_params = AdditionalParams::default();
additional_params.min_likelihood = Some(6);
Expand All @@ -146,7 +146,7 @@ mod tests {
assert_eq!(resp.status, 200);
assert_eq!(
resp.data.twitter_url,
Some("twitter.com/omarmendez".to_string())
Some("twitter.com/rc1994".to_string())
);
}

Expand Down Expand Up @@ -233,7 +233,7 @@ mod tests {
base_params.pretty = Some(true);

let mut person_params = PersonParams::default();
person_params.company = Some(vec!["walmart".to_string()]);
person_params.company = Some(vec!["adams group".to_string()]);

let indentify_person_params = IdentifyPersonParams {
base_params: Some(base_params),
Expand Down Expand Up @@ -288,7 +288,7 @@ mod tests {

let mut search_base_params = SearchBaseParams::default();
search_base_params.sql =
Some("SELECT * FROM person WHERE location_country='mexico';".to_string());
Some("SELECT * FROM person WHERE location_country='united states';".to_string());

let search_params = SearchParams {
base_params: Some(base_params),
Expand Down
9 changes: 9 additions & 0 deletions src/models/autocomplete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ pub struct Meta {
pub website: Option<String>,
pub location_name: Option<String>,
pub id: Option<String>,
pub industry: Option<String>,
pub linkedin_slug: Option<String>,
pub display_name: Option<String>,
pub display_name_history: Option<Vec<String>>,
pub alternative_names: Option<Vec<String>>,
pub country: Option<String>,
pub locality: Option<String>,
pub region: Option<String>,
pub role: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
Expand Down
1 change: 1 addition & 0 deletions src/models/company.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ pub struct FundingDetails {
pub struct CompanyResponse {
/// See https://docs.peopledatalabs.com/docs/example-company-record for more information.
pub status: Option<i32>,
pub dataset_version: Option<String>,
pub display_name: Option<String>,
pub name: Option<String>,
pub size: Option<String>,
Expand Down
1 change: 1 addition & 0 deletions src/models/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pub struct IPResult {
pub ip: IPInfo,
pub company: Option<IPCompany>,
pub person: Option<IPPerson>,
pub dataset_version: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
Expand Down
1 change: 1 addition & 0 deletions src/models/person.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ pub struct PersonErrorInfo {
#[derive(Debug, Serialize, Deserialize)]
pub struct Person {
pub id: Option<String>,
pub dataset_version: Option<String>,
pub full_name: Option<String>,
pub first_name: Option<String>,
pub middle_initial: Option<String>,
Expand Down
Loading