public class LiClientManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LiClientManager.Client
Enum of all clients.
|
static class |
LiClientManager.CollectionsType
Enum of all collection types.
|
| Constructor and Description |
|---|
LiClientManager() |
| Modifier and Type | Method and Description |
|---|---|
static LiClient |
getAcceptSolutionClient(LiClientRequestParams liClientRequestParams)
Marks a message as an accepted solution.
|
static LiClient |
getBeaconClient(LiClientRequestParams liClientRequestParams)
This is a beacon client which is used to send information to the community backend for analytics aka LSI
|
static LiClient |
getBoardsByDepthClient(LiClientRequestParams liClientRequestParams)
Fetches boards at a specific depth in the Community Structure hierarchy.
|
static LiClient |
getCategoryBoardsClient(LiClientRequestParams liClientRequestParams)
Fetches a list of boards for a given category, along with board and category details.
|
static LiClient |
getCategoryClient(LiClientRequestParams liClientRequestParams)
Fetches category details available to the user in context.
|
static LiClient |
getCreateMessageClient(LiClientRequestParams liClientRequestParams)
Posts a new message to the community.
|
static LiClient |
getCreateReplyClient(LiClientRequestParams liClientRequestParams)
Creates a reply or comment.
|
static LiClient |
getCreateUserClient(LiClientRequestParams liClientRequestParams)
Creates new user account.
|
static LiClient |
getDeviceIdFetchClient(LiClientRequestParams liClientRequestParams)
Fetches the ID corresponding to device ID from the community.
|
static LiClient |
getDeviceIdUpdateClient(LiClientRequestParams liClientRequestParams)
Updates the device ID in community with the given device ID.
|
static LiClient |
getFloatedMessagesClient(LiClientRequestParams liClientRequestParams)
Fetches details of all floated (or "pinned") of the specified board for the user in context.
|
static LiClient |
getGenericLiqlGetClient(LiClientRequestParams liClientRequestParams)
This is generic Get client.
|
static LiClient |
getGenericNoLiqlGetClient(LiClientRequestParams liClientRequestParams)
This is generic Get client.
|
static LiClient |
getGenericPostClient(LiClientRequestParams liClientRequestParams)
This is generic Post client.
|
static LiClient |
getGenericPutClient(LiClientRequestParams liClientRequestParams)
This is generic PUT client.
|
static LiClient |
getGenericQueryDeleteClient(LiClientRequestParams liClientRequestParams)
This is a generic DELETE client.
|
static LiClient |
getGenericQueryParamsGetClient(LiClientRequestParams liClientRequestParams)
Creates custom WHERE clause, ORDER BY, and/or LIMIT parameters to a LIQL queries used by a Lithium API provider.
|
static LiClient |
getKudoClient(LiClientRequestParams liClientRequestParams)
Kudos the specified message for the user in context.
|
static LiClient |
getMarkMessagePostClient(LiClientRequestParams liClientRequestParams)
Mark a single message as read or unread
Create parameters with
LiClientRequestParams.LiMarkMessageParams. |
static LiClient |
getMarkMessagesPostClient(LiClientRequestParams liClientRequestParams)
Marks a set of messages (not necessarily in the same thread) as read or unread.
|
static LiClient |
getMarkTopicPostClient(LiClientRequestParams liClientRequestParams)
Marks a topic message and all its replies as read or unread.
|
static LiClient |
getMessageClient(LiClientRequestParams liClientRequestParams)
Fetches details of the specified message.
|
static LiClient |
getMessageDeleteClient(LiClientRequestParams liClientRequestParams)
Deletes the specified message.
|
static LiClient |
getMessagesByBoardIdClient(LiClientRequestParams liClientRequestParams)
Fetches all articles on the specified board, authored by the user in context.
|
static LiClient |
getMessagesByIdsClient(LiClientRequestParams liClientRequestParams)
Fetches details for the specified set of messages.
|
static LiClient |
getMessagesClient(LiClientRequestParams liClientRequestParams)
Fetches a list of all the articles for the user in context ordered by post time or kudos count.
|
static LiClient |
getRepliesClient(LiClientRequestParams liClientRequestParams)
Fetches details of child messages of the specified message.
|
static LiClient |
getReportAbuseClient(LiClientRequestParams liClientRequestParams)
Creates an abuse report for the specified message.
|
static LiRestv2Client |
getRestClient() |
static LiClient |
getSdkSettingsClient(LiClientRequestParams liClientRequestParams)
Fetches all the SDK settings from the Community app.
|
static LiClient |
getSearchClient(LiClientRequestParams liClientRequestParams)
Performs a keyword search in the community.
|
static LiClient |
getSubscriptionDeleteClient(LiClientRequestParams liClientRequestParams)
Deletes a subscription.
|
static LiClient |
getSubscriptionPostClient(LiClientRequestParams liClientRequestParams)
Creates a subscription to the specified target (a board or message).
|
static LiClient |
getUnKudoClient(LiClientRequestParams liClientRequestParams)
Unkudos the specified message for the user in context.
|
static LiClient |
getUpdateMessageClient(LiClientRequestParams liClientRequestParams)
Updates an existing message by ID.
|
static LiClient |
getUpdateUserClient(LiClientRequestParams liClientRequestParams)
Updates an existing user.
|
static LiClient |
getUploadImageClient(LiClientRequestParams liClientRequestParams)
Uploads an image to the community on behalf of the user in context.
|
static LiClient |
getUserDetailsClient(LiClientRequestParams liClientRequestParams)
Fetches all details about the specified user.
|
static LiClient |
getUserMessagesClient(LiClientRequestParams liClientRequestParams)
Fetches messages posted by a specified author up to a specified depth in the Community Structure hierarchy.
|
static LiClient |
getUserSubscriptionsClient(LiClientRequestParams liClientRequestParams)
Fetches a list of all Community subscriptions for the user in context.
|
public static LiRestv2Client getRestClient() throws LiRestResponseException
LiRestResponseExceptionpublic static LiClient getMessagesClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - the Android context
(required)LiMessageLiRestResponseException - LiRestResponseExceptionpublic static LiClient getMessagesByBoardIdClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - the Android
context (required)liClientRequestParams - the ID of the board from which to fetch the messages (required)LiMessageLiRestResponseException - LiRestResponseExceptionpublic static LiClient getSdkSettingsClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - the Android context
(required)liClientRequestParams - the client ID (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getUserSubscriptionsClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - the Android
context (required)LiSubscriptionsLiRestResponseException - LiRestResponseExceptionpublic static LiClient getCategoryBoardsClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiCategoryBoardsClientRequestParams.liClientRequestParams - LiClientRequestParams.LiCategoryBoardsClientRequestParams the Android
context (required)liClientRequestParams - the category ID (required)LiBrowseLiRestResponseException - LiRestResponseExceptionpublic static LiClient getBoardsByDepthClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiBoardsByDepthClientRequestParams.liClientRequestParams - LiClientRequestParams.LiBoardsByDepthClientRequestParams the Android
context (required)liClientRequestParams - the depth of boards to include in the query (required)LiBrowseLiRestResponseException - LiRestResponseExceptionpublic static LiClient getRepliesClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiRepliesClientRequestParams.liClientRequestParams - LiClientRequestParams.LiRepliesClientRequestParams the Android context
(required)liClientRequestParams - the ID of the parent message (required)LiMessageLiRestResponseException - LiRestResponseExceptionpublic static LiClient getSearchClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiSearchClientRequestParams.liClientRequestParams - LiClientRequestParams.LiSearchClientRequestParams the Android context
(required)liClientRequestParams - the text string to search, passed as 'query'. The 'query' parameter is compared
with the body and subject of the message. (required)LiMessageLiRestResponseException - LiRestResponseExceptionpublic static LiClient getUserMessagesClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiUserMessagesClientRequestParams.liClientRequestParams - LiClientRequestParams.LiUserMessagesClientRequestParams the Android
context (required)liClientRequestParams - the ID of the author (required)liClientRequestParams - the depth of the message, where the a topic message = 0, the first reply = 1, and
so on (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getCategoryClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiCategoryClientRequestParams.liClientRequestParams - LiClientRequestParams.LiCategoryClientRequestParams the Android context
(required)LiBrowseLiRestResponseException - LiRestResponseExceptionpublic static LiClient getUserDetailsClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiUserDetailsClientRequestParams.liClientRequestParams - LiClientRequestParams.LiUserDetailsClientRequestParams the Android
context (required)liClientRequestParams - the ID of the user (required)LiUserLiRestResponseException - LiClient LiRestResponseExceptionpublic static LiClient getMessageClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiMessageClientRequestParams.liClientRequestParams - LiClientRequestParams.LiMessageClientRequestParams the Android context
(required)liClientRequestParams - the ID of the message (required)LiMessageLiRestResponseException - LiRestResponseExceptionpublic static LiClient getFloatedMessagesClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - the Android context
(required)liClientRequestParams - the ID of the board (required)liClientRequestParams - the scope for searching the floated messages. Supported scopes: "global", "local"
(required)LiFloatedMessageModelLiRestResponseException - LiRestResponseExceptionpublic static LiClient getMessagesByIdsClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - the Android context
(required)liClientRequestParams - the IDs of the messages, passed as a set (required)LiMessageLiRestResponseException - LiRestResponseExceptionpublic static LiClient getKudoClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiKudoClientRequestParams.
Uses LiPostKudoModel to build the request body. The model is converted to a JsonObject, which is then
used in the POST call.liClientRequestParams - LiClientRequestParams.LiKudoClientRequestParams the Android context
(required)liClientRequestParams - the ID of the message to kudo (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getUnKudoClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiUnKudoClientRequestParams.
Uses LiPostKudoModel to build the request body. The model is converted to a JsonObject, which is then
used in the POST call.liClientRequestParams - LiClientRequestParams.LiUnKudoClientRequestParams the Android context
(required)liClientRequestParams - the ID of the message to unkudoed (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getAcceptSolutionClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiAcceptSolutionClientRequestParams.
Uses LiAcceptSolutionModel to build the request body. The model is converted to a JsonObject, which is
then used in the POST call.liClientRequestParams - LiClientRequestParams.LiAcceptSolutionClientRequestParams the Android
context (required)liClientRequestParams - the ID of the message to mark as a solution (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getCreateMessageClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiCreateMessageClientRequestParams.
Uses LiPostMessageModel to build the request body. The model is converted to a JsonObject, which is
then used in the POST call.liClientRequestParams - LiClientRequestParams.LiCreateMessageClientRequestParams the Android
context (required)liClientRequestParams - the subject of the message (required)liClientRequestParams - the body of the message (required)liClientRequestParams - the image filename (if an image is included in the message)liClientRequestParams - the image ID (if an image is included in the message)liClientRequestParams - the ID of the board where the message will be posted (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getUpdateMessageClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiUpdateMessageClientRequestParams.
Uses LiPostMessageModel to build the request body. The model is converted to a JsonObject, which is
then used in the PUT call.liClientRequestParams - LiClientRequestParams.LiUpdateMessageClientRequestParams the Android
context (required)liClientRequestParams - the message subjectliClientRequestParams - the message bodyliClientRequestParams - the message ID (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getCreateReplyClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiCreateReplyClientRequestParams.
Uses LiReplyMessageModel to build request body. The model is converted to a JsonObject, which is then
used in the POST call.liClientRequestParams - LiClientRequestParams.LiCreateReplyClientRequestParams the Android
context (required)liClientRequestParams - the message ID (required)liClientRequestParams - the message body (required)liClientRequestParams - the image filename (if the message includes an image)liClientRequestParams - the image ID (if the message includes an image)LiClientLiRestResponseException - LiClient LiRestResponseExceptionpublic static LiClient getUploadImageClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiUploadImageClientRequestParams.
Uses LiUploadImageModel to build request body. The model is converted to a JsonObject, which is then
used in the POST call.liClientRequestParams - LiClientRequestParams.LiUploadImageClientRequestParams the Android
context (required)liClientRequestParams - the image title (required)liClientRequestParams - the image filename (required)liClientRequestParams - the absolute path to the image (required)
Note: the image filename and the filename in the absolute path param above must
be equal.LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getReportAbuseClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiReportAbuseClientRequestParams.
Uses the LiMarkAbuseModel to build the request body. The model is converted to a JsonObject, which is
then used in the POST call.
Added 1.0.2
liClientRequestParams - LiClientRequestParams.LiReportAbuseClientRequestParams the Android
context (required)liClientRequestParams - the ID of message to report (required)liClientRequestParams - the message body of the message being reported (required)liClientRequestParams - the ID of the user making the abuse report (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getDeviceIdFetchClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiDeviceIdFetchClientRequestParams.liClientRequestParams - LiClientRequestParams.LiDeviceIdFetchClientRequestParams the ID
registered with
notification
providerliClientRequestParams - the Global provider for Push notification. Currently "GCM" and "FIREBASE".LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getDeviceIdUpdateClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiDeviceIdUpdateClientRequestParams.liClientRequestParams - LiClientRequestParams.LiDeviceIdUpdateClientRequestParams the Android
context (required)liClientRequestParams - the device ID registered with the push notification provider (required)liClientRequestParams - the ID corresponding to device ID in the community (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getCreateUserClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiCreateUserParams.
Uses LiCreateUpdateUserModel to build the request body. The model is converted to a JsonObject, which
is then used in the POST call.
Added 1.1.0
liClientRequestParams - LiClientRequestParams.LiCreateUserParams the Android context (required)liClientRequestParams - the user's login (required)liClientRequestParams - the user's password (required)liClientRequestParams - the user's email (required)liClientRequestParams - the user's avatarliClientRequestParams - the user's biographyliClientRequestParams - the user's first nameliClientRequestParams - the user's last nameLiClientLiRestResponseExceptionpublic static LiClient getMarkMessagePostClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiMarkMessageParams.
Uses the LiMarkMessageModel to build the request body. The model is converted to a JsonObject, which
is then used in the POST call.
Added 1.1.0
liClientRequestParams - LiClientRequestParams.LiMarkMessageParams the Android context (required)liClientRequestParams - the ID of the user marking the message (required)liClientRequestParams - the ID of the message (required)liClientRequestParams - whether to mark the message read or unread. Pass 'markUnread' as 'true' to mark
the message as read. (required)LiClientLiRestResponseExceptionpublic static LiClient getMarkMessagesPostClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiMarkMessagesParams.
Uses the LiMarkMessagesModel to build the request body. The model is converted to a JsonObject, which
is then used in the POST call.
Added 1.1.0
liClientRequestParams - LiClientRequestParams.LiMarkMessagesParams the Android contextliClientRequestParams - the user marking the messages (required)liClientRequestParams - the IDs of the messages to mark in a comma-separated list (required)liClientRequestParams - whether to mark the messages read or unread. Pass 'markUnread' as 'true' to mark
the messages as read. (required)LiClientLiRestResponseExceptionpublic static LiClient getMarkTopicPostClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiMarkTopicParams.
Uses the LiMarkTopicModel to build the request body. The model is converted to a JsonObject, which is
then used in the POST call.
Added 1.1.0
liClientRequestParams - LiClientRequestParams.LiMarkTopicParams the Android context (required)liClientRequestParams - the ID of the topic message to mark (required)liClientRequestParams - whether to mark the messages read or unread. Pass 'markUnread' as 'true' to mark
the messages as read. (required)LiClientLiRestResponseExceptionpublic static LiClient getSubscriptionPostClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiPostSubscriptionParams.
The parameters can either be a target which is a LiBaseModel in the form of LiMessage or
LiBrowse
which was selected to be subscribed to and needs to be passed in the constructor
Alternatively in the parameters "message/boardId" and "type" need to be passed in the constructor. "type" is either "message" or "board" depending upon what was selected.
If both are set then the target takes precedence and string parameters are ignored.
Uses the LiSubscriptionPostModel to build the request body.
The model is converted to a JsonObject, which is then used in the POST call.
Added 1.0.1
liClientRequestParams - LiClientRequestParams.LiPostSubscriptionParams the Android context
(required)liClientRequestParams - the target of the subscription -- a board or message (required)LiClientLiRestResponseExceptionpublic static LiClient getSubscriptionDeleteClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - LiClientRequestParams.LiDeleteSubscriptionParams the Android contextliClientRequestParams - the subscription IDLiClientLiRestResponseExceptionpublic static LiClient getUpdateUserClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiUpdateUserParams.
Uses LiCreateUpdateUserModel to build the request body. The model is converted to a JsonObject, which
is then used in the POST call.
Added 1.1.0
liClientRequestParams - LiClientRequestParams.LiUpdateUserParams the Android context (required)liClientRequestParams - the user's avatar image urlliClientRequestParams - the user's avatar image external urlliClientRequestParams - the user's avatar image internal urlliClientRequestParams - the user's avatar image idliClientRequestParams - the user's biographyliClientRequestParams - the user's cover imageliClientRequestParams - the user's emailliClientRequestParams - the user's first nameliClientRequestParams - the user's last nameliClientRequestParams - the user's loginLiClientLiRestResponseExceptionpublic static LiClient getGenericPostClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiGenericPostClientRequestParams.liClientRequestParams - LiClientRequestParams.LiGenericPostClientRequestParams the Android contextliClientRequestParams - the path to a Community v1 or v2 endpointliClientRequestParams - the request body as a JsonObjectLiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getBeaconClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - LiClientRequestParams.LiBeaconPostClientRequestParamsLiRestResponseExceptionpublic static LiClient getGenericPutClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiGenericPutClientRequestParams.liClientRequestParams - LiClientRequestParams.LiGenericPutClientRequestParams the Android context
(required)liClientRequestParams - the path to a Community v1 or v2 endpoint (required)liClientRequestParams - the request body as a JsonObject (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getGenericLiqlGetClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiGenericLiqlClientRequestParams.liClientRequestParams - LiClientRequestParams.LiGenericLiqlClientRequestParams the Android
context (required)liClientRequestParams - a custom LiQL query (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getGenericNoLiqlGetClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiGenericLiqlClientRequestParams.liClientRequestParams - LiClientRequestParams.LiGenericLiqlClientRequestParams the Android
context (required)liClientRequestParams - a custom LiQL query (required)LiClientLiRestResponseException - LiRestResponseExceptionpublic static LiClient getGenericQueryParamsGetClient(LiClientRequestParams liClientRequestParams)
LiClientRequestParams.LiGenericQueryParamsClientRequestParams.liClientRequestParams - LiClientRequestParams.LiGenericQueryParamsClientRequestParams the Android
contextLiClientpublic static LiClient getGenericQueryDeleteClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
liClientRequestParams - LiClientRequestParams.LiGenericDeleteClientRequestParamsLiClientLiRestResponseExceptionpublic static LiClient getMessageDeleteClient(LiClientRequestParams liClientRequestParams) throws LiRestResponseException
LiClientRequestParams.LiMessageDeleteClientRequestParams.
Optionally pass the 'includeReplies' parameters as 'true' to delete replies or comments associated with the
message.liClientRequestParams - LiClientRequestParams.LiMessageDeleteClientRequestParams the Android contextliClientRequestParams - the ID of the message to deleteliClientRequestParams - whether or not to delete replies/comments to the messageLiClientLiRestResponseException - LiRestResponseException