org.springframework.social.linkedin.api.impl
Class LinkedInTemplate

java.lang.Object
  extended by org.springframework.social.linkedin.api.impl.LinkedInTemplate
All Implemented Interfaces:
LinkedInApi

public class LinkedInTemplate
extends java.lang.Object
implements LinkedInApi

This is the central class for interacting with LinkedIn.

Greenhouse operations require OAuth authentication with the server. Therefore, LinkedInTemplate must be constructed with the minimal information required to sign requests with and OAuth 1 Authorization header.


Constructor Summary
LinkedInTemplate(java.lang.String apiKey, java.lang.String apiSecret, java.lang.String accessToken, java.lang.String accessTokenSecret)
          Creates a new LinkedInTemplate given the minimal amount of information needed to sign requests with OAuth 1 credentials.
 
Method Summary
 java.util.List<LinkedInProfile> getConnections()
          Retrieves the 1st-degree connections from the current user's network.
 java.lang.String getProfileId()
          Retrieves the user's LinkedIn profile ID.
 java.lang.String getProfileUrl()
          Retrieves a URL to the user's public profile page.
protected  RestTemplate getRestTemplate()
           
 LinkedInProfile getUserProfile()
          Retrieves the current user's profile details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkedInTemplate

public LinkedInTemplate(java.lang.String apiKey,
                        java.lang.String apiSecret,
                        java.lang.String accessToken,
                        java.lang.String accessTokenSecret)
Creates a new LinkedInTemplate given the minimal amount of information needed to sign requests with OAuth 1 credentials.

Parameters:
apiKey - the application's API key
apiSecret - the application's API secret
accessToken - an access token acquired through OAuth authentication with LinkedIn
accessTokenSecret - an access token secret acquired through OAuth authentication with LinkedIn
Method Detail

getProfileId

public java.lang.String getProfileId()
Description copied from interface: LinkedInApi
Retrieves the user's LinkedIn profile ID.

Specified by:
getProfileId in interface LinkedInApi
Returns:
the user's LinkedIn profile ID.

getProfileUrl

public java.lang.String getProfileUrl()
Description copied from interface: LinkedInApi
Retrieves a URL to the user's public profile page.

Specified by:
getProfileUrl in interface LinkedInApi
Returns:
a URL to the user's public profile page.

getUserProfile

public LinkedInProfile getUserProfile()
Description copied from interface: LinkedInApi
Retrieves the current user's profile details.

Specified by:
getUserProfile in interface LinkedInApi
Returns:
the user's profile data.

getConnections

public java.util.List<LinkedInProfile> getConnections()
Description copied from interface: LinkedInApi
Retrieves the 1st-degree connections from the current user's network.

Specified by:
getConnections in interface LinkedInApi
Returns:
the user's connections

getRestTemplate

protected RestTemplate getRestTemplate()