API Query Params
A CTAPIQueryParams
object must be created and initialised after initialising the SDK to make requests using our API methods.
Example CTAPIQueryParams
import CarTrawlerSDK
let params = CTAPIQueryParams()
params.delegate = self
params.clientID = "your clientID"
params.countryCode = "IE" // The country code associated with the device’s system region is used by default.
params.currencyCode = "EUR" // The currency associated with the device’s system region is used by default.
params.languageCode = "EN" // The language associated with the device’s system region is used by default.
params.iataCode = "DUB" // use IATACode for Objective-C
params.iataCodeDropoff = "DUB" // use IATACodeDropoff for Objective-C
params.pickupDate = Date(timeIntervalSinceNow: 86400) // next day
params.dropOffDate = Date(timeIntervalSinceNow: 86400 * 3) // next day + 3 days
params.numberOfVehicles = 20
params.sortType = .recommended
Property Descriptions
- delegate
- A CarTrawlerSDKDelegate to receive the API response.
- clientID
- Your client ID, required to use the CarTrawler API.
- countryCode
- A country code, such as "US". Default is the device location if not provided.
- currencyCode
- An optional currency code, based on the ISO standard currency codes e.g "USD". The currency associated with the device’s system region is used by default.
- languageCode
- A language code. The language associated with the device’s system region is used by default.
- pickupDate
- [Required] A pick-up Date.
- dropOffDate
- [Required] A Drop-off Date.
- IATACode
- An IATA code for pick-up location.
- IATACodeDropoff
- An IATA code for drop-off location.
- pickupLocationID
- An OTA Location ID for pick-up location.
- dropOffLocationID
- An OTA Location ID for drop-off location.
- passengers
- An Array of Passengers, the first one will be the main passenger.
- numberOfVehicles
- A number of vehicles to return, used in the Vehicles API
- sortType
- The sort type, used in the Vehicles API