Linkedin

Struct Linkedin 

Source
pub struct Linkedin { /* private fields */ }
Expand description

Main struct for interacting with the LinkedIn API asynchronously.

Implementations§

Source§

impl Linkedin

Source

pub async fn new( identity: &Identity, refresh_cookies: bool, ) -> Result<Self, LinkedinError>

Create a new LinkedIn client and authenticate.

Source

pub async fn get_profile( &self, public_id: &str, ) -> Result<Profile, LinkedinError>

Returns a LinkedIn profile.

Source

pub async fn get_profile_by_urn( &self, urn: &UniformResourceName, ) -> Result<Profile, LinkedinError>

Returns a LinkedIn profile by URN ID.

Source

pub async fn get_profile_connections( &self, urn_id: &str, ) -> Result<Vec<Connection>, LinkedinError>

Returns a LinkedIn profile’s first degree connections.

Source

pub async fn get_profile_contact_info( &self, public_id: &str, ) -> Result<ContactInfo, LinkedinError>

Returns a LinkedIn profile’s contact information.

Source

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.

Source

pub async fn get_profile_skills( &self, public_id: &str, ) -> Result<Vec<Skill>, LinkedinError>

Returns a LinkedIn profile’s skills.

Source

pub async fn get_profile_skills_by_urn( &self, urn: UniformResourceName, ) -> Result<Vec<Skill>, LinkedinError>

Returns a LinkedIn profile’s skills by URN ID.

Source

pub async fn get_profile_privacy_settings( &self, public_id: &str, ) -> Result<HashMap<String, Value>, LinkedinError>

Returns a LinkedIn profile’s privacy settings.

Source

pub async fn get_profile_member_badges( &self, public_id: &str, ) -> Result<MemberBadges, LinkedinError>

Returns a LinkedIn profile’s member badges.

Source

pub async fn get_profile_network_info( &self, public_id: &str, ) -> Result<NetworkInfo, LinkedinError>

Returns high-level network info for a profile.

Source

pub async fn remove_connection( &self, public_id: &str, ) -> Result<bool, LinkedinError>

Removes a connection.

Source

pub async fn get_conversations( &self, ) -> Result<Vec<Conversation>, LinkedinError>

Return list of metadata of the user’s conversations.

Source

pub async fn get_conversation_details( &self, profile_urn_id: &str, ) -> Result<ConversationDetails, LinkedinError>

Return conversation details for a profile URN ID.

Source

pub async fn get_conversation( &self, conversation_urn_id: &str, ) -> Result<Conversation, LinkedinError>

Return a conversation.

Source

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.

Source

pub async fn mark_conversation_as_seen( &self, conversation_urn_id: &str, ) -> Result<bool, LinkedinError>

Mark a conversation as seen.

Source

pub async fn get_current_profile_views(&self) -> Result<u64, LinkedinError>

Get view statistics for the current profile.

Source

pub async fn get_school(&self, public_id: &str) -> Result<School, LinkedinError>

Returns a school’s LinkedIn profile.

Source

pub async fn get_company( &self, public_id: &str, ) -> Result<Company, LinkedinError>

Returns a company’s LinkedIn profile.

Source

pub async fn search( &self, params: HashMap<String, String>, limit: Option<usize>, ) -> Result<Vec<Value>, LinkedinError>

Perform a LinkedIn search.

Source

pub async fn search_people( &self, params: SearchPeopleParams, ) -> Result<Vec<PersonSearchResult>, LinkedinError>

Perform a people search.

Source

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.

Source

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.

Source

pub async fn get_invitations( &self, start: usize, limit: usize, ) -> Result<Vec<Invitation>, LinkedinError>

Get all invitations for the current profile.

Source

pub async fn reply_invitation( &self, invitation_entity_urn: &str, invitation_shared_secret: &str, action: &str, ) -> Result<bool, LinkedinError>

Reply to an invitation.

Source

pub async fn get_user_profile(&self) -> Result<Value, LinkedinError>

Get current user profile.

Stub people search with query.

Trait Implementations§

Source§

impl Clone for Linkedin

Source§

fn clone(&self) -> Linkedin

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,