public abstract class AbstractFrydAPIService
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
BASE_API_URL |
protected static java.util.logging.Logger |
logger |
protected com.github.scribejava.core.oauth.OAuth20Service |
oauthService |
| Constructor and Description |
|---|
AbstractFrydAPIService(com.github.scribejava.core.oauth.OAuth20Service oauthService,
java.lang.String baseAPIUrl) |
| Modifier and Type | Method and Description |
|---|---|
protected com.github.scribejava.core.model.OAuthRequest |
createRequest(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String urlAddon) |
abstract APIResponse<Location> |
getFrydSpotById(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String locationId) |
abstract java.util.concurrent.Future<APIResponse<Location>> |
getFrydSpotByIdAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String locationId) |
abstract APIResponse<java.util.List<Trophy>> |
getTrophiesOfList(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String trophylistId) |
abstract java.util.concurrent.Future<APIResponse<java.util.List<Trophy>>> |
getTrophiesOfListAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String trophylistId) |
abstract APIResponse<Trophy> |
getTrophyById(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String trophyId) |
abstract java.util.concurrent.Future<APIResponse<Trophy>> |
getTrophyByIdAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String trophyId) |
abstract APIResponse<java.util.List<Trophylist>> |
getTrophylistsFromLocation(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String locationId) |
abstract java.util.concurrent.Future<APIResponse<java.util.List<Trophylist>>> |
getTrophylistsFromLocationAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String locationId) |
abstract APIResponse<User> |
getUserInformation(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken) |
abstract java.util.concurrent.Future<APIResponse<User>> |
getUserInformationAsync(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken) |
protected <T> APIResponse<T> |
handleRequest(T t,
com.github.scribejava.core.model.OAuthRequest request) |
protected <T> APIResponse<T> |
handleRequestAsync(T t,
com.github.scribejava.core.model.OAuthRequest request) |
protected <T> APIResponse<T> |
handleRequestInternal(T t,
com.github.scribejava.core.model.Response response) |
protected APIResponse<java.util.List<Trophy>> |
transformTrophiesResponse(APIResponse<Trophy.Trophies> oldResponse) |
protected APIResponse<java.util.List<Trophylist>> |
transformTrophylistResponse(APIResponse<Trophylist.Trophylists> oldResponse) |
abstract APIResponse<java.lang.String> |
triggerTrophyProgress(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken,
com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String locationId,
java.lang.String secret) |
abstract java.util.concurrent.Future<APIResponse<java.lang.String>> |
triggerTrophyProgressAsync(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken,
com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String locationId,
java.lang.String secret) |
protected static final java.util.logging.Logger logger
protected final com.github.scribejava.core.oauth.OAuth20Service oauthService
protected final java.lang.String BASE_API_URL
public AbstractFrydAPIService(com.github.scribejava.core.oauth.OAuth20Service oauthService,
java.lang.String baseAPIUrl)
public abstract APIResponse<Location> getFrydSpotById(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String locationId) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic abstract java.util.concurrent.Future<APIResponse<Location>> getFrydSpotByIdAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String locationId)
public abstract APIResponse<java.util.List<Trophylist>> getTrophylistsFromLocation(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String locationId) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic abstract java.util.concurrent.Future<APIResponse<java.util.List<Trophylist>>> getTrophylistsFromLocationAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String locationId)
public abstract APIResponse<java.util.List<Trophy>> getTrophiesOfList(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String trophylistId) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic abstract java.util.concurrent.Future<APIResponse<java.util.List<Trophy>>> getTrophiesOfListAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String trophylistId)
public abstract APIResponse<Trophy> getTrophyById(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String trophyId) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic abstract java.util.concurrent.Future<APIResponse<Trophy>> getTrophyByIdAsync(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String trophyId)
public abstract APIResponse<User> getUserInformation(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic abstract java.util.concurrent.Future<APIResponse<User>> getUserInformationAsync(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken)
public abstract APIResponse<java.lang.String> triggerTrophyProgress(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken, com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String locationId, java.lang.String secret) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionpublic abstract java.util.concurrent.Future<APIResponse<java.lang.String>> triggerTrophyProgressAsync(com.github.scribejava.core.model.OAuth2AccessToken userAccessToken, com.github.scribejava.core.model.OAuth2AccessToken appAccessToken, java.lang.String locationId, java.lang.String secret)
protected com.github.scribejava.core.model.OAuthRequest createRequest(com.github.scribejava.core.model.OAuth2AccessToken appAccessToken,
java.lang.String urlAddon)
protected <T> APIResponse<T> handleRequest(T t, com.github.scribejava.core.model.OAuthRequest request) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionprotected <T> APIResponse<T> handleRequestAsync(T t, com.github.scribejava.core.model.OAuthRequest request) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOExceptionprotected <T> APIResponse<T> handleRequestInternal(T t, com.github.scribejava.core.model.Response response) throws java.io.IOException
java.io.IOExceptionprotected APIResponse<java.util.List<Trophylist>> transformTrophylistResponse(APIResponse<Trophylist.Trophylists> oldResponse)
protected APIResponse<java.util.List<Trophy>> transformTrophiesResponse(APIResponse<Trophy.Trophies> oldResponse)