public class APIContext extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_API_BASE |
static String |
DEFAULT_API_VERSION |
static String |
DEFAULT_VIDEO_API_BASE |
protected boolean |
isDebug |
protected PrintStream |
logger |
Constructor and Description |
---|
APIContext(String accessToken) |
APIContext(String accessToken,
String appSecret) |
APIContext(String endpointBase,
String videoEndpointBase,
String version,
String accessToken,
String appSecret) |
Modifier and Type | Method and Description |
---|---|
APIContext |
enableDebug(boolean isDebug) |
String |
getAccessToken() |
String |
getAppSecret() |
String |
getAppSecretProof() |
String |
getEndpointBase() |
PrintStream |
getLogger() |
String |
getVersion() |
String |
getVideoEndpointBase() |
boolean |
hasAppSecret() |
boolean |
isDebug() |
void |
log(String s) |
APIContext |
setLogger(PrintStream logger) |
static String |
sha256(String secret,
String message) |
static String |
toHex(byte[] bytes) |
public static final String DEFAULT_API_BASE
public static final String DEFAULT_API_VERSION
public static final String DEFAULT_VIDEO_API_BASE
protected boolean isDebug
protected PrintStream logger
public APIContext(String endpointBase, String videoEndpointBase, String version, String accessToken, String appSecret)
public APIContext(String accessToken)
public String getEndpointBase()
public String getVideoEndpointBase()
public String getAccessToken()
public String getAppSecret()
public boolean hasAppSecret()
public String getAppSecretProof()
public String getVersion()
public boolean isDebug()
public APIContext enableDebug(boolean isDebug)
public PrintStream getLogger()
public APIContext setLogger(PrintStream logger)
public void log(String s)
public static String toHex(byte[] bytes)
Copyright © 2018. All rights reserved.