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

Support for Updated Title Roles #31

Merged
merged 1 commit into from
Sep 17, 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.1.0"
version = "2.2.0"
edition = "2021"
description = "A Rust client for the People Data Labs API"
documentation = "https://docs.peopledatalabs.com/docs/rust-sdk"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023-2024 People Data Labs
Copyright (c) 2024 People Data Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions src/models/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ pub struct AdditionalParams {
/// includes a value for each queried field parameter that was "matched-on" during our internal query.
#[serde(rename = "include_if_matched", default)]
pub include_if_matched: 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, Default)]
Expand Down
16 changes: 16 additions & 0 deletions src/models/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ use serde::{Deserialize, Serialize};

use crate::{models::common::BaseParams, PDLError};

#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "lowercase")]
pub enum ConfidenceLevel {
VeryHigh,
High,
Moderate,
Low,
VeryLow,
}

#[derive(Debug, Serialize, Deserialize, Default)]
pub struct IPBaseParams {
/// IP that is used as the seed for enrichment
Expand All @@ -19,6 +29,12 @@ pub struct IPBaseParams {
/// If true, the response will return metadata/location even if no company is found
#[serde(rename = "return_if_unmatched", default)]
pub return_if_unmatched: Option<bool>,
/// If true, the response will return updated title tags
#[serde(rename = "updated_title_roles", default)]
pub updated_title_roles: Option<bool>,
/// Minimum confidence level required for returning data
#[serde(rename = "min_confidence", default)]
pub min_confidence: Option<ConfidenceLevel>,
}

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