spring-social-github

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

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

public class UserTemplate
extends java.lang.Object
implements UserOperations

User template implementation.

Author:
Willie Wheeler (willie.wheeler@gmail.com)

Constructor Summary
UserTemplate(org.springframework.web.client.RestTemplate restTemplate, boolean isAuthorizedForUser)
           
 
Method Summary
protected  java.lang.String buildUri(java.lang.String path)
           
 java.util.List<GitHubUser> getFollowers(java.lang.String user)
          Public operation to return a given user's followers.
 java.util.List<GitHubUser> getFollowing(java.lang.String user)
          Public operation to return the users that a given user is following.
 java.lang.String getProfileId()
          Retrieves the user's GitHub profile ID.
 java.lang.String getProfileUrl()
          Retrieve the URL to the user's GitHub profile.
 GitHubUserProfile getUserProfile()
          Retrieves the user's GitHub profile details.
protected  void requireAuthorization()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTemplate

public UserTemplate(org.springframework.web.client.RestTemplate restTemplate,
                    boolean isAuthorizedForUser)
Parameters:
restTemplate -
isAuthorizedForUser -
Method Detail

getProfileId

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

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

getUserProfile

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

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

getProfileUrl

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

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

getFollowers

public java.util.List<GitHubUser> getFollowers(java.lang.String user)
Description copied from interface: UserOperations
Public operation to return a given user's followers.

Specified by:
getFollowers in interface UserOperations
Parameters:
user - GitHub user
Returns:
list of followers

getFollowing

public java.util.List<GitHubUser> getFollowing(java.lang.String user)
Description copied from interface: UserOperations
Public operation to return the users that a given user is following.

Specified by:
getFollowing in interface UserOperations
Parameters:
user - GitHub user
Returns:
list of users the given user is following

requireAuthorization

protected void requireAuthorization()

buildUri

protected java.lang.String buildUri(java.lang.String path)

spring-social-github