88import com .pubnub .api .core .PubnubError ;
99import com .pubnub .api .core .PubnubException ;
1010import com .pubnub .api .core .enums .PNOperationType ;
11- import com .pubnub .api .core .models .consumer_facing .PNHistoryResult ;
1211import com .pubnub .api .core .models .consumer_facing .PNHistoryItemResult ;
12+ import com .pubnub .api .core .models .consumer_facing .PNHistoryResult ;
1313import lombok .Builder ;
1414import retrofit2 .Call ;
1515import retrofit2 .Response ;
1818import retrofit2 .http .QueryMap ;
1919
2020import java .io .IOException ;
21- import java .util .HashMap ;
2221import java .util .Map ;
2322
2423@ Builder
@@ -36,7 +35,7 @@ private interface HistoryService {
3635 @ GET ("v2/history/sub-key/{subKey}/channel/{channel}" )
3736 Call <JsonNode > fetchHistory (@ Path ("subKey" ) String subKey ,
3837 @ Path ("channel" ) String channel ,
39- @ QueryMap Map <String , String > options );
38+ @ QueryMap Map <String , Object > options );
4039 }
4140
4241 @ Override
@@ -45,8 +44,7 @@ protected boolean validateParams() {
4544 }
4645
4746 @ Override
48- protected Call <JsonNode > doWork () {
49- Map <String , String > params = new HashMap <String , String >();
47+ protected Call <JsonNode > doWork (Map <String , Object > params ) {
5048
5149 HistoryService service = this .createRetrofit (pubnub ).create (HistoryService .class );
5250
@@ -111,6 +109,11 @@ protected PNOperationType getOperationType() {
111109 return PNOperationType .PNHistoryOperation ;
112110 }
113111
112+ @ Override
113+ protected Pubnub getPubnub () {
114+ return pubnub ;
115+ }
116+
114117 private Object processMessage (JsonNode message ) throws PubnubException {
115118 if (this .pubnub .getConfiguration ().getCipherKey () == null ) {
116119 return message ;
0 commit comments