public class LiBasePostClient
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 LiQueryRequestParams |
liQueryRequestParams |
protected LiRestV2Request |
liRestV2Request |
LiPostModel |
postModel |
protected java.lang.String |
querySettingsType |
protected lithium.community.android.sdk.api.LiBaseClient.RequestType |
requestType |
protected java.lang.String |
type |
| Constructor and Description |
|---|
LiBasePostClient(android.content.Context context,
java.lang.String basePath)
Constructor used for normal POST call.
|
LiBasePostClient(android.content.Context context,
java.lang.String basePath,
java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
Constructor used for normal POST call.
|
LiBasePostClient(android.content.Context context,
java.lang.String basePath,
java.lang.String imagePath,
java.lang.String imageName)
Constructor used for making POST call to upload image.
|
| Modifier and Type | Method and Description |
|---|---|
Gson |
getGson()
Fetches Gson from
LiRestv2Client
LiClient.getGson() |
java.lang.String |
getRequestBody() |
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()
Sets request body and initializes
LiRestV2Request. |
LiClient |
setOrdering(LiQueryOrdering liQueryOrdering)
Use to set liQueryOrdering in LIQL if any
|
public LiPostModel postModel
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
protected LiQueryRequestParams liQueryRequestParams
public LiBasePostClient(android.content.Context context,
java.lang.String basePath)
throws LiRestResponseException
basePath - Api end point.LiRestResponseExceptionpublic LiBasePostClient(android.content.Context context,
java.lang.String basePath,
java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
throws LiRestResponseException
basePath - Api end point.LiRestResponseExceptionpublic LiBasePostClient(android.content.Context context,
java.lang.String basePath,
java.lang.String imagePath,
java.lang.String imageName)
throws LiRestResponseException
basePath - Api end point.imagePath - Absolute path of the image.imageName - Name of the image file.LiRestResponseExceptionpublic void setLiRestV2Request()
LiRestV2Request.public java.lang.String getRequestBody()
public void processAsync(LiAsyncRequestCallback liAsyncRequestCallback) throws LiRestResponseException
LiClient.processAsync(LiAsyncRequestCallback)processAsync in interface LiClientliAsyncRequestCallback - LiAsyncRequestCallbackLiRestResponseExceptionpublic void processAsync(LiAsyncRequestCallback liAsyncRequestCallback, java.lang.String imagePath, java.lang.String imageName) throws LiRestResponseException
processAsync in interface LiClientliAsyncRequestCallback - LiAsyncRequestCallbackimagePath - this is the absolute path of the image.imageName - this is the name of the image file.LiRestResponseExceptionpublic LiClientResponse processSync() throws LiRestResponseException
LiClient.processSync()processSync in interface LiClientLiRestResponseExceptionpublic Gson getGson()
LiRestv2Client
LiClient.getGson()public java.lang.String getType()
public lithium.community.android.sdk.api.LiBaseClient.RequestType getRequestType()
LiClientgetRequestType in interface LiClientpublic LiClient setOrdering(LiQueryOrdering liQueryOrdering)
setOrdering in interface LiClientliQueryOrdering - LiQueryOrdering