pub struct Linkedin { /* private fields */ }
Expand description
Main struct for interacting with the LinkedIn API asynchronously.
Implementations§
Source§impl Linkedin
impl Linkedin
Sourcepub async fn new(
identity: &Identity,
refresh_cookies: bool,
) -> Result<Self, LinkedinError>
pub async fn new( identity: &Identity, refresh_cookies: bool, ) -> Result<Self, LinkedinError>
Create a new LinkedIn client and authenticate.
Sourcepub async fn get_profile(
&self,
public_id: &str,
) -> Result<Profile, LinkedinError>
pub async fn get_profile( &self, public_id: &str, ) -> Result<Profile, LinkedinError>
Returns a LinkedIn profile.
Sourcepub async fn get_profile_by_urn(
&self,
urn: &UniformResourceName,
) -> Result<Profile, LinkedinError>
pub async fn get_profile_by_urn( &self, urn: &UniformResourceName, ) -> Result<Profile, LinkedinError>
Returns a LinkedIn profile by URN ID.
Sourcepub async fn get_profile_connections(
&self,
urn_id: &str,
) -> Result<Vec<Connection>, LinkedinError>
pub async fn get_profile_connections( &self, urn_id: &str, ) -> Result<Vec<Connection>, LinkedinError>
Returns a LinkedIn profile’s first degree connections.
Sourcepub async fn get_profile_contact_info(
&self,
public_id: &str,
) -> Result<ContactInfo, LinkedinError>
pub async fn get_profile_contact_info( &self, public_id: &str, ) -> Result<ContactInfo, LinkedinError>
Returns a LinkedIn profile’s contact information.
Sourcepub async fn get_profile_contact_info_by_urn(
&self,
urn_id: &UniformResourceName,
) -> Result<ContactInfo, LinkedinError>
pub async fn get_profile_contact_info_by_urn( &self, urn_id: &UniformResourceName, ) -> Result<ContactInfo, LinkedinError>
Returns a LinkedIn profile’s contact information by URN ID.
Sourcepub async fn get_profile_skills(
&self,
public_id: &str,
) -> Result<Vec<Skill>, LinkedinError>
pub async fn get_profile_skills( &self, public_id: &str, ) -> Result<Vec<Skill>, LinkedinError>
Returns a LinkedIn profile’s skills.
Sourcepub async fn get_profile_skills_by_urn(
&self,
urn: UniformResourceName,
) -> Result<Vec<Skill>, LinkedinError>
pub async fn get_profile_skills_by_urn( &self, urn: UniformResourceName, ) -> Result<Vec<Skill>, LinkedinError>
Returns a LinkedIn profile’s skills by URN ID.
Sourcepub async fn get_profile_privacy_settings(
&self,
public_id: &str,
) -> Result<HashMap<String, Value>, LinkedinError>
pub async fn get_profile_privacy_settings( &self, public_id: &str, ) -> Result<HashMap<String, Value>, LinkedinError>
Returns a LinkedIn profile’s privacy settings.
Sourcepub async fn get_profile_member_badges(
&self,
public_id: &str,
) -> Result<MemberBadges, LinkedinError>
pub async fn get_profile_member_badges( &self, public_id: &str, ) -> Result<MemberBadges, LinkedinError>
Returns a LinkedIn profile’s member badges.
Sourcepub async fn get_profile_network_info(
&self,
public_id: &str,
) -> Result<NetworkInfo, LinkedinError>
pub async fn get_profile_network_info( &self, public_id: &str, ) -> Result<NetworkInfo, LinkedinError>
Returns high-level network info for a profile.
Sourcepub async fn remove_connection(
&self,
public_id: &str,
) -> Result<bool, LinkedinError>
pub async fn remove_connection( &self, public_id: &str, ) -> Result<bool, LinkedinError>
Removes a connection.
Sourcepub async fn get_conversations(
&self,
) -> Result<Vec<Conversation>, LinkedinError>
pub async fn get_conversations( &self, ) -> Result<Vec<Conversation>, LinkedinError>
Return list of metadata of the user’s conversations.
Sourcepub async fn get_conversation_details(
&self,
profile_urn_id: &str,
) -> Result<ConversationDetails, LinkedinError>
pub async fn get_conversation_details( &self, profile_urn_id: &str, ) -> Result<ConversationDetails, LinkedinError>
Return conversation details for a profile URN ID.
Sourcepub async fn get_conversation(
&self,
conversation_urn_id: &str,
) -> Result<Conversation, LinkedinError>
pub async fn get_conversation( &self, conversation_urn_id: &str, ) -> Result<Conversation, LinkedinError>
Return a conversation.
Sourcepub async fn send_message(
&self,
conversation_urn_id: Option<&str>,
recipients: Option<Vec<String>>,
message_body: &str,
) -> Result<bool, LinkedinError>
pub async fn send_message( &self, conversation_urn_id: Option<&str>, recipients: Option<Vec<String>>, message_body: &str, ) -> Result<bool, LinkedinError>
Sends a message to a conversation or recipients.
Sourcepub async fn mark_conversation_as_seen(
&self,
conversation_urn_id: &str,
) -> Result<bool, LinkedinError>
pub async fn mark_conversation_as_seen( &self, conversation_urn_id: &str, ) -> Result<bool, LinkedinError>
Mark a conversation as seen.
Sourcepub async fn get_current_profile_views(&self) -> Result<u64, LinkedinError>
pub async fn get_current_profile_views(&self) -> Result<u64, LinkedinError>
Get view statistics for the current profile.
Sourcepub async fn get_school(&self, public_id: &str) -> Result<School, LinkedinError>
pub async fn get_school(&self, public_id: &str) -> Result<School, LinkedinError>
Returns a school’s LinkedIn profile.
Sourcepub async fn get_company(
&self,
public_id: &str,
) -> Result<Company, LinkedinError>
pub async fn get_company( &self, public_id: &str, ) -> Result<Company, LinkedinError>
Returns a company’s LinkedIn profile.
Sourcepub async fn search(
&self,
params: HashMap<String, String>,
limit: Option<usize>,
) -> Result<Vec<Value>, LinkedinError>
pub async fn search( &self, params: HashMap<String, String>, limit: Option<usize>, ) -> Result<Vec<Value>, LinkedinError>
Perform a LinkedIn search.
Sourcepub async fn search_people(
&self,
params: SearchPeopleParams,
) -> Result<Vec<PersonSearchResult>, LinkedinError>
pub async fn search_people( &self, params: SearchPeopleParams, ) -> Result<Vec<PersonSearchResult>, LinkedinError>
Perform a people search.
Sourcepub async fn get_company_updates(
&self,
public_id: Option<&str>,
urn_id: Option<&str>,
max_results: Option<usize>,
) -> Result<Vec<Value>, LinkedinError>
pub async fn get_company_updates( &self, public_id: Option<&str>, urn_id: Option<&str>, max_results: Option<usize>, ) -> Result<Vec<Value>, LinkedinError>
Get company updates.
Sourcepub async fn get_profile_updates(
&self,
public_id: Option<&str>,
urn_id: Option<&str>,
max_results: Option<usize>,
) -> Result<Vec<Value>, LinkedinError>
pub async fn get_profile_updates( &self, public_id: Option<&str>, urn_id: Option<&str>, max_results: Option<usize>, ) -> Result<Vec<Value>, LinkedinError>
Get profile updates.
Sourcepub async fn get_invitations(
&self,
start: usize,
limit: usize,
) -> Result<Vec<Invitation>, LinkedinError>
pub async fn get_invitations( &self, start: usize, limit: usize, ) -> Result<Vec<Invitation>, LinkedinError>
Get all invitations for the current profile.
Sourcepub async fn reply_invitation(
&self,
invitation_entity_urn: &str,
invitation_shared_secret: &str,
action: &str,
) -> Result<bool, LinkedinError>
pub async fn reply_invitation( &self, invitation_entity_urn: &str, invitation_shared_secret: &str, action: &str, ) -> Result<bool, LinkedinError>
Reply to an invitation.
Sourcepub async fn get_user_profile(&self) -> Result<Value, LinkedinError>
pub async fn get_user_profile(&self) -> Result<Value, LinkedinError>
Get current user profile.
Sourcepub async fn stub_people_search(
&self,
query: &str,
count: usize,
start: usize,
) -> Result<Value, LinkedinError>
pub async fn stub_people_search( &self, query: &str, count: usize, start: usize, ) -> Result<Value, LinkedinError>
Stub people search with query.