org.springframework.social.github.api.impl
Class GitHubTemplate

java.lang.Object
  extended by org.springframework.social.github.api.impl.GitHubTemplate
All Implemented Interfaces:
GitHubApi

public class GitHubTemplate
extends java.lang.Object
implements GitHubApi

The central class for interacting with TripIt.

TripIt operations require OAuth 1 authentication. Therefore TripIt template must be given the minimal amount of information required to sign requests to the TripIt API with an OAuth Authorization header.


Constructor Summary
GitHubTemplate(java.lang.String accessToken)
          Constructs a GitHubTemplate with the minimal amount of information required to sign requests with an OAuth Authorization header.
 
Method Summary
 java.lang.String getProfileId()
          Retrieves the user's GitHub profile ID.
 java.lang.String getProfileUrl()
          Retrieve the URL to the user's GitHub profile.
protected  RestTemplate getRestTemplate()
           
 GitHubUserProfile getUserProfile()
          Retrieves the user's GitHub profile details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GitHubTemplate

public GitHubTemplate(java.lang.String accessToken)
Constructs a GitHubTemplate with the minimal amount of information required to sign requests with an OAuth Authorization header.

Parameters:
accessToken - An access token granted to the application after OAuth authentication.
Method Detail

getProfileId

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

Specified by:
getProfileId in interface GitHubApi
Returns:
the user's GitHub profile ID.

getUserProfile

public GitHubUserProfile getUserProfile()
Description copied from interface: GitHubApi
Retrieves the user's GitHub profile details.

Specified by:
getUserProfile in interface GitHubApi
Returns:
the user's GitHub profile

getProfileUrl

public java.lang.String getProfileUrl()
Description copied from interface: GitHubApi
Retrieve the URL to the user's GitHub profile.

Specified by:
getProfileUrl in interface GitHubApi
Returns:
the URL to the user's GitHub profile.

getRestTemplate

protected RestTemplate getRestTemplate()