public class API extends Object
Provides a static method instance(Class, Token) which constructs a standard retrofit service with all the required options.
| Modifier and Type | Method and Description |
|---|---|
static AuthorisationAPI |
authorisationInstance()
Get an instance of the authorisation API (cached)
|
static <T> T |
instance(Class<T> class1,
Token token)
Creates and returns a new API RestAdapter instance.
|
static retrofit.RestAdapter.LogLevel |
logLevel(Class<?> class1) |
public static <T> T instance(Class<T> class1, Token token)
Creates and returns a new API RestAdapter instance.
T - Class of API interface to be instantiated (one of the *API.java interfaces)class1 - The class to be returnedtoken - The access token required for authentication of requests to the Strava APIpublic static retrofit.RestAdapter.LogLevel logLevel(Class<?> class1)
class1 - Class for which log level is to be determinedpublic static AuthorisationAPI authorisationInstance()
Get an instance of the authorisation API (cached)
Copyright © 2015 Dan Shannon. All rights reserved.