From b3eacf2ec48ad62493127715a67f0a01d7a147c7 Mon Sep 17 00:00:00 2001 From: Varun Villait Date: Tue, 17 Sep 2024 08:26:44 -0700 Subject: [PATCH] api updates (#31) --- Cargo.toml | 2 +- LICENSE | 2 +- src/models/common.rs | 3 +++ src/models/ip.rs | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 12547d1..134b378 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/LICENSE b/LICENSE index 588aed2..006bae8 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/src/models/common.rs b/src/models/common.rs index 8a9d3cb..1f282d9 100644 --- a/src/models/common.rs +++ b/src/models/common.rs @@ -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, + /// If true, the response will return updated title tags + #[serde(rename = "updated_title_roles", default)] + pub updated_title_roles: Option, } #[derive(Debug, Serialize, Deserialize, Default)] diff --git a/src/models/ip.rs b/src/models/ip.rs index cf0fd01..bee0afa 100644 --- a/src/models/ip.rs +++ b/src/models/ip.rs @@ -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 @@ -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, + /// If true, the response will return updated title tags + #[serde(rename = "updated_title_roles", default)] + pub updated_title_roles: Option, + /// Minimum confidence level required for returning data + #[serde(rename = "min_confidence", default)] + pub min_confidence: Option, } #[derive(Debug, Serialize, Deserialize)]