EventsAPI
public enum EventsAPI
                Caseless enumeration with static methods to send Events Requests
- 
                  
                  
Sends a request to get lists of events.
Declaration
Swift
public static func getEvents(with parameters: Parameters? = nil, completion: ResponseCompletion<[Event]> = nil)Parameters
parametersThe
Parametersto apply. Commonly used parameter keys are:completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request that gets an event with ID.
Declaration
Swift
public static func getEvent(id: Int, with parameters: Parameters? = nil, completion: ResponseCompletion<Event> = nil)Parameters
idThe id of the event.
parametersThe
Parametersto apply. A commonly used parameter key is:completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request that gets an event with name.
Declaration
Swift
public static func getEvent(name: String, with parameters: Parameters? = nil, completion: ResponseCompletion<Event> = nil)Parameters
nameName of the event that will be fetched.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request that favorites an event.
Declaration
Swift
public static func favoriteEvent(id: Int, completion: ResponseCompletion<Bool> = nil)Parameters
idThe id of the event.
completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request that unfavorites an event.
Declaration
Swift
public static func unfavoriteEvent(id: Int, completion: ResponseCompletion<Bool> = nil)Parameters
idThe id of the event.
completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request that responds to an event.
Declaration
Swift
public static func respondToEvent(id: Int, latitude: Double, longitude: Double, completion: ResponseCompletion<Event.Response> = nil)Parameters
idThe id of the event that will be responded to.
locationCurrent location of the user.
completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request that cancels an event.
Declaration
Swift
public static func cancelEvent(responseId: String, with parameters: Parameters? = nil, completion: ResponseCompletion<Event.Response> = nil)Parameters
responseIdThe
Event.ResponseID.parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 
- 
                  
                  
Sends a request to get lists of event responses.
Declaration
Swift
public static func getEventResponses(with parameters: Parameters? = nil, completion: ResponseCompletion<[Event.Response]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get an event response with ID.
Declaration
Swift
public static func getEventResponse(id: String, with parameters: Parameters? = nil, completion: ResponseCompletion<Event.Response> = nil)Parameters
idID of the event response that will be fetched.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 
- 
                  
                  
Sends a request to get lists of event categories.
Declaration
Swift
public static func getCategories(with parameters: Parameters? = nil, completion: ResponseCompletion<[Event.Category]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 
- 
                  
                  
Sends a request to get lists of event dates for page.
Declaration
Swift
public static func getEventDates(with parameters: Parameters? = nil, completion: ResponseCompletion<[Event.Date]> = nil)Parameters
parametersThe
Parametersto apply. Commonly used parameter keys are:completionThe closure to be executed once the request has finished.
 
View on GitHub
        EventsAPI Enumeration Reference