Skip to content

Commit

Permalink
api updates (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvillait88 authored Sep 17, 2024
1 parent c60cb9e commit b3eacf2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
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

0 comments on commit b3eacf2

Please sign in to comment.