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 makingStructs§
- Linked
InValidator - A
LinkedInprofile validator that performs HTTP requests to verify profile existence.
Enums§
- Linked
InUrl Error - Errors that can occur during
LinkedInURL validation.
Functions§
- is_
valid_ linkedin_ profile_ format - Checks if a URL has valid
LinkedInprofile 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
LinkedInprofile URL asynchronously.