Class UserTemplate
- java.lang.Object
-
- org.springframework.social.github.api.impl.UserTemplate
-
- All Implemented Interfaces:
UserOperations
public class UserTemplate extends Object implements UserOperations
User template implementation.
- Author:
- Willie Wheeler (willie.wheeler@gmail.com)
-
-
Constructor Summary
Constructors Constructor Description UserTemplate(org.springframework.web.client.RestTemplate restTemplate, boolean isAuthorizedForUser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringbuildUri(String path)List<GitHubUser>getFollowers(String user)Public operation to return a given user's followers.List<GitHubUser>getFollowing(String user)Public operation to return the users that a given user is following.StringgetProfileId()Retrieves the user's GitHub profile ID.StringgetProfileUrl()Retrieve the URL to the user's GitHub profile.GitHubUserProfilegetUserProfile()Retrieves the user's GitHub profile details.protected voidrequireAuthorization()
-
-
-
Method Detail
-
getProfileId
public String getProfileId()
Description copied from interface:UserOperationsRetrieves the user's GitHub profile ID.- Specified by:
getProfileIdin interfaceUserOperations- Returns:
- the user's GitHub profile ID.
-
getUserProfile
public GitHubUserProfile getUserProfile()
Description copied from interface:UserOperationsRetrieves the user's GitHub profile details.- Specified by:
getUserProfilein interfaceUserOperations- Returns:
- the user's GitHub profile
-
getProfileUrl
public String getProfileUrl()
Description copied from interface:UserOperationsRetrieve the URL to the user's GitHub profile.- Specified by:
getProfileUrlin interfaceUserOperations- Returns:
- the URL to the user's GitHub profile.
-
getFollowers
public List<GitHubUser> getFollowers(String user)
Description copied from interface:UserOperationsPublic operation to return a given user's followers.- Specified by:
getFollowersin interfaceUserOperations- Parameters:
user- GitHub user- Returns:
- list of followers
-
getFollowing
public List<GitHubUser> getFollowing(String user)
Description copied from interface:UserOperationsPublic operation to return the users that a given user is following.- Specified by:
getFollowingin interfaceUserOperations- Parameters:
user- GitHub user- Returns:
- list of users the given user is following
-
requireAuthorization
protected void requireAuthorization()
-
-