public class LiBaseGetClient
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
lithium.community.android.sdk.api.LiBaseClient.RequestType
Enum to classify Request Type
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
basePath |
protected android.content.Context |
context |
protected LiQueryOrdering |
liQueryOrdering |
protected LiRestV2Request |
liRestV2Request |
protected java.lang.String |
querySettingsType |
protected lithium.community.android.sdk.api.LiBaseClient.RequestType |
requestType |
protected java.lang.String |
type |
Constructor and Description |
---|
LiBaseGetClient(android.content.Context context,
java.lang.String activityLIQL,
java.lang.String type,
java.lang.Class<? extends LiBaseModel> responseClass,
LiQueryRequestParams liQueryRequestParams) |
LiBaseGetClient(android.content.Context context,
java.lang.String activityLIQL,
java.lang.String type,
java.lang.String querySettingsType,
java.lang.Class<? extends LiBaseModel> responseClass) |
LiBaseGetClient(android.content.Context context,
java.lang.String activityLIQL,
java.lang.String type,
java.lang.String querySettingsType,
java.lang.Class<? extends LiBaseModel> responseClass,
java.lang.String pathParam) |
Modifier and Type | Method and Description |
---|---|
Gson |
getGson()
Fetches Gson from
LiRestv2Client
LiClient.getGson() |
protected java.lang.String |
getLiqlQuery()
Method to return LIQL query for a particular client based on client type and base query.
|
java.lang.String |
getRequestBody()
Request body is always null for GET Client.
|
lithium.community.android.sdk.api.LiBaseClient.RequestType |
getRequestType()
Method to get Request Type
|
java.lang.String |
getType()
Returns type i.e whether message, image, kudo etc..
|
void |
processAsync(LiAsyncRequestCallback liAsyncRequestCallback)
This method is for making an async network call.
|
void |
processAsync(LiAsyncRequestCallback liAsyncRequestCallback,
java.lang.String imagePath,
java.lang.String imageName)
processSync call to upload files
|
LiClientResponse |
processSync()
This method is for making a sync network call.
|
void |
setLiRestV2Request()
Initialize
LiRestV2Request with LIQL and type. |
LiClient |
setOrdering(LiQueryOrdering liQueryOrdering)
Use to set liQueryOrdering in LIQL if any
|
LiClient |
setReplacer(LiQueryValueReplacer liQueryValueReplacer)
Method to add liQueryValueReplacer to replace special characters with actual values
|
protected final java.lang.String type
protected java.lang.String querySettingsType
protected android.content.Context context
protected LiRestV2Request liRestV2Request
protected java.lang.String basePath
protected lithium.community.android.sdk.api.LiBaseClient.RequestType requestType
protected LiQueryOrdering liQueryOrdering
public LiBaseGetClient(android.content.Context context, java.lang.String activityLIQL, java.lang.String type, java.lang.String querySettingsType, java.lang.Class<? extends LiBaseModel> responseClass) throws LiRestResponseException
LiRestResponseException
public LiBaseGetClient(android.content.Context context, java.lang.String activityLIQL, java.lang.String type, java.lang.String querySettingsType, java.lang.Class<? extends LiBaseModel> responseClass, java.lang.String pathParam) throws LiRestResponseException
LiRestResponseException
public LiBaseGetClient(android.content.Context context, java.lang.String activityLIQL, java.lang.String type, java.lang.Class<? extends LiBaseModel> responseClass, LiQueryRequestParams liQueryRequestParams)
public void setLiRestV2Request()
LiRestV2Request
with LIQL and type.
LiBaseClient.setLiRestV2Request()
public java.lang.String getRequestBody()
protected java.lang.String getLiqlQuery()
public LiClient setReplacer(LiQueryValueReplacer liQueryValueReplacer)
liQueryValueReplacer
- LiQueryValueReplacer
public void processAsync(LiAsyncRequestCallback liAsyncRequestCallback) throws LiRestResponseException
LiClient.processAsync(LiAsyncRequestCallback)
processAsync
in interface LiClient
liAsyncRequestCallback
- LiAsyncRequestCallback
LiRestResponseException
public void processAsync(LiAsyncRequestCallback liAsyncRequestCallback, java.lang.String imagePath, java.lang.String imageName) throws LiRestResponseException
processAsync
in interface LiClient
liAsyncRequestCallback
- LiAsyncRequestCallback
imagePath
- this is the absolute path of the image.imageName
- this is the name of the image file.LiRestResponseException
public LiClientResponse processSync() throws LiRestResponseException
LiClient.processSync()
processSync
in interface LiClient
LiRestResponseException
public Gson getGson()
LiRestv2Client
LiClient.getGson()
public java.lang.String getType()
public lithium.community.android.sdk.api.LiBaseClient.RequestType getRequestType()
LiClient
getRequestType
in interface LiClient
public LiClient setOrdering(LiQueryOrdering liQueryOrdering)
setOrdering
in interface LiClient
liQueryOrdering
- LiQueryOrdering