Crate credify

Source
Expand description

LinkedIn profile URL validation library.

This crate provides tools to validate LinkedIn profile URLs by checking both format correctness and profile existence through HTTP requests.

§Features

  • Format validation without network calls
  • Profile existence verification
  • Async and sync APIs
  • Rate limiting awareness

§Examples

§Basic usage

use credify::{LinkedInValidator, LinkedInUrlError};

let validator = LinkedInValidator::new().expect("Failed to create validator");
match validator.is_valid_linkedin_profile_url("https://www.linkedin.com/in/johndoe") {
    Ok(_) => println!("Profile exists!"),
    Err(LinkedInUrlError::ProfileNotFound) => println!("Profile not found"),
    Err(LinkedInUrlError::AuthenticationRequired) => println!("LinkedIn requires auth"),
    Err(e) => println!("Error: {}", e),
}

§Format validation only

use credify::is_valid_linkedin_profile_format;

if is_valid_linkedin_profile_format("https://www.linkedin.com/in/johndoe") {
    println!("Valid LinkedIn profile URL format");
}

§LLM-friendly validation

use credify::validate_for_llm;

let result = validate_for_llm("https://www.linkedin.com/in/johndoe");
println!("{}", result);
// Parse the structured output for automated decision making

Structs§

LinkedInValidator
A LinkedIn profile validator that performs HTTP requests to verify profile existence.

Enums§

LinkedInUrlError
Errors that can occur during LinkedIn URL validation.

Functions§

is_valid_linkedin_profile_format
Checks if a URL has valid LinkedIn profile format without making network calls.
validate_for_llm
Validates a LinkedIn profile URL and returns a structured string for LLM consumption.
validate_for_llm_async
Validates a LinkedIn profile URL asynchronously and returns a structured string for LLM consumption.
validate_linkedin_url_async
Validates a LinkedIn profile URL asynchronously.