Class EventsAPI
- java.lang.Object
-
- com.cheetahdigital.corekit.models.module.Controller
-
- com.cheetahdigital.event.core.api.EventsAPI
-
- All Implemented Interfaces:
RestController
public class EventsAPI extends Controller
Class for setting the query parameters of Events API.
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.corekit.models.module.Controller
STANDARD_DATE_FORMAT, TIMEZONE_DATE_FORMAT
-
-
Constructor Summary
Constructors Constructor Description EventsAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEventToFavorite(EventsParams eventsParams, Listener<SuccessResponse> listener)
Save an event on your watch listvoid
cancelEvent(EventsParams eventsParams, Listener<SuccessResponse> listener)
Remove an event from your watch listvoid
getEvent(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<Event>,Event> listener)
Get the specific eventvoid
getEventCategories(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventCategories>,EventCategories> listener)
Get the list of EventCategoriesvoid
getEventDates(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventDates>,EventDates> listener)
Gets list of datesvoid
getEventResponse(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventResponse>,EventResponse> listener)
Get the specified event responsevoid
getEventResponses(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventResponses>,EventResponses> listener)
Get the list of EventResponsesvoid
getEvents(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<Events>,Events> listener)
Get the list of Eventsvoid
removeEventFromFavorite(EventsParams eventsParams, Listener<SuccessResponse> listener)
Remove an event from your watch listvoid
respondToEvent(java.lang.String latLongJson, EventsParams eventsParams, Listener<SuccessResponse> listener)
Respond to event-
Methods inherited from class com.cheetahdigital.corekit.models.module.Controller
createCache, createHttpClient, createRetrofitInterface, evictAllCache, getGsonConfiguration, getRestAdapter, getTimeoutConnectionInSeconds, getTimeoutSocketInSeconds, initialize, removeResponsesFromCache
-
-
-
-
Method Detail
-
getEventDates
public void getEventDates(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventDates>,EventDates> listener)
Gets list of dates- Parameters:
eventsParams
- theEventsParams
forEventsAPI
clearCache
- set totrue
to clear previously stored responselistener
- listener that handles the result from API
-
getEvent
public void getEvent(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<Event>,Event> listener)
Get the specific event- Parameters:
eventsParams
- theEventsParams
forEventsAPI
clearCache
- set totrue
to clear previously stored responselistener
- listener that handles the result from API
-
getEventResponse
public void getEventResponse(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventResponse>,EventResponse> listener)
Get the specified event response- Parameters:
eventsParams
- theEventsParams
forEventsAPI
clearCache
- set totrue
to clear previously stored responselistener
- listener that handles the result from API
-
addEventToFavorite
public void addEventToFavorite(EventsParams eventsParams, Listener<SuccessResponse> listener)
Save an event on your watch list- Parameters:
eventsParams
- theEventsParams
forEventsAPI
listener
- listener that handles the result from API
-
respondToEvent
public void respondToEvent(java.lang.String latLongJson, EventsParams eventsParams, Listener<SuccessResponse> listener)
Respond to event- Parameters:
latLongJson
- coordinates of the events locationeventsParams
- theEventsParams
forEventsAPI
listener
- listener that handles the result from API
-
removeEventFromFavorite
public void removeEventFromFavorite(EventsParams eventsParams, Listener<SuccessResponse> listener)
Remove an event from your watch list- Parameters:
eventsParams
- theEventsParams
forEventsAPI
listener
- listener that handles the result from API
-
cancelEvent
public void cancelEvent(EventsParams eventsParams, Listener<SuccessResponse> listener)
Remove an event from your watch list- Parameters:
eventsParams
- theEventsParams
forEventsAPI
listener
- listener that handles the result from API
-
getEvents
public void getEvents(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<Events>,Events> listener)
Get the list of Events- Parameters:
eventsParams
- theEventsParams
forEventsAPI
clearCache
- set totrue
to clear previously stored responselistener
- listener that handles the result from API
-
getEventCategories
public void getEventCategories(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventCategories>,EventCategories> listener)
Get the list of EventCategories- Parameters:
eventsParams
- theEventsParams
forEventsAPI
clearCache
- set totrue
to clear previously stored responselistener
- listener that handles the result from API
-
getEventResponses
public void getEventResponses(EventsParams eventsParams, boolean clearCache, ListenerModel<BaseModel<EventResponses>,EventResponses> listener)
Get the list of EventResponses- Parameters:
eventsParams
- theEventsParams
forEventsAPI
clearCache
- set totrue
to clear previously stored responselistener
- listener that handles the result from API
-
-