PunchCardsAPI
public enum PunchCardsAPI
Caseless enumeration with static methods to send Punch Card Requests
-
Sends a request to get punchcards from the API.
Declaration
Swift
public static func getPunchCards(with parameters: Parameters? = nil, completion: ResponseCompletion<[PunchCard]> = nil)
Parameters
parameters
The
Parameters
to apply.completion
The closure to be executed once the request has finished.
-
Sends a request to get a specific punchcard with ID.
Declaration
Swift
public static func getPunchCard(id: Int, parameters: Parameters? = nil, completion: ResponseCompletion<PunchCard> = nil)
Parameters
id
ID of the punchcard.
parameters
The
Parameters
to apply.completion
The closure to be executed once the request has finished.
-
Sends a request to get a specific punchcard with name.
Declaration
Swift
public static func getPunchCard(name: String, parameters: Parameters? = nil, completion: ResponseCompletion<PunchCard> = nil)
Parameters
name
Name of the punchcard.
parameters
The
Parameters
to apply.completion
The closure to be executed once the request has finished.
-
Sends a request to get punchcard type with name.
Declaration
Swift
public static func getPunchCardType(name: String, parameters: Parameters? = nil, completion: ResponseCompletion<PunchCard.PunchCardType> = nil)
Parameters
name
Name of the punchcard.
parameters
The
Parameters
to apply.completion
The closure to be executed once the request has finished.