Package com.pubnub.api.endpoints
Class MessageCounts
- java.lang.Object
-
- com.pubnub.api.endpoints.Endpoint<com.google.gson.JsonElement,PNMessageCountResult>
-
- com.pubnub.api.endpoints.MessageCounts
-
- All Implemented Interfaces:
RemoteAction<PNMessageCountResult>
public class MessageCounts extends Endpoint<com.google.gson.JsonElement,PNMessageCountResult>
-
-
Constructor Summary
Constructors Constructor Description MessageCounts(PubNub pubnub, TelemetryManager telemetryManager, RetrofitManager retrofit, TokenManager tokenManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageCounts
channels(java.util.List<java.lang.String> channels)
The channel name you wish to pull history from.MessageCounts
channelsTimetoken(java.util.List<java.lang.Long> channelsTimetoken)
Comma-delimited list of timetokens, in order of the channels list, in the request path.protected PNMessageCountResult
createResponse(retrofit2.Response<com.google.gson.JsonElement> input)
protected retrofit2.Call<com.google.gson.JsonElement>
doWork(java.util.Map<java.lang.String,java.lang.String> params)
protected java.util.List<java.lang.String>
getAffectedChannelGroups()
protected java.util.List<java.lang.String>
getAffectedChannels()
protected PNOperationType
getOperationType()
protected boolean
isAuthRequired()
protected void
validateParams()
-
Methods inherited from class com.pubnub.api.endpoints.Endpoint
async, createBaseParams, encodeParams, getPubnub, getRetrofit, isError, queryParam, retry, silentCancel, sync
-
-
-
-
Constructor Detail
-
MessageCounts
public MessageCounts(PubNub pubnub, TelemetryManager telemetryManager, RetrofitManager retrofit, TokenManager tokenManager)
-
-
Method Detail
-
getAffectedChannels
protected java.util.List<java.lang.String> getAffectedChannels()
- Specified by:
getAffectedChannels
in classEndpoint<com.google.gson.JsonElement,PNMessageCountResult>
-
getAffectedChannelGroups
protected java.util.List<java.lang.String> getAffectedChannelGroups()
- Specified by:
getAffectedChannelGroups
in classEndpoint<com.google.gson.JsonElement,PNMessageCountResult>
-
validateParams
protected void validateParams() throws PubNubException
- Specified by:
validateParams
in classEndpoint<com.google.gson.JsonElement,PNMessageCountResult>
- Throws:
PubNubException
-
doWork
protected retrofit2.Call<com.google.gson.JsonElement> doWork(java.util.Map<java.lang.String,java.lang.String> params)
- Specified by:
doWork
in classEndpoint<com.google.gson.JsonElement,PNMessageCountResult>
-
createResponse
protected PNMessageCountResult createResponse(retrofit2.Response<com.google.gson.JsonElement> input) throws PubNubException
- Specified by:
createResponse
in classEndpoint<com.google.gson.JsonElement,PNMessageCountResult>
- Throws:
PubNubException
-
getOperationType
protected PNOperationType getOperationType()
- Specified by:
getOperationType
in classEndpoint<com.google.gson.JsonElement,PNMessageCountResult>
-
isAuthRequired
protected boolean isAuthRequired()
- Specified by:
isAuthRequired
in classEndpoint<com.google.gson.JsonElement,PNMessageCountResult>
-
channels
public MessageCounts channels(java.util.List<java.lang.String> channels)
The channel name you wish to pull history from. May be a single channel, or multiple channels, separated by comma.- Returns:
this
.
-
channelsTimetoken
public MessageCounts channelsTimetoken(java.util.List<java.lang.Long> channelsTimetoken)
Comma-delimited list of timetokens, in order of the channels list, in the request path. If list of timetokens is not same length as list of channels, a 400 bad request will result.- Returns:
this
.
-
-