The Baato Swift package makes it easy to integrate the Baato API into existing iOS projects.
This package is available as a Swift Package Manager. To integrate BaatoSwift into your project, for more Please check this Doc
// Initialize Baato with your key
BaatoSwift.configure(configure: Configuration(mode: .live, key: "<-YOUR-KEY->"))
Helper methods in BaatoSwift make it easy to perform API requests to Baato.
let res = BaatoSwift.location.search(query: "s", limit: 10, type: "town")
the BaatoSwift.location.reverseGeocode
method can be used to make requests to the Reverse Search API.
BaatoSwift.location.reverseGeocode(coordinate: CLLocationCoordinate2D(latitude: 27.70446921370009, longitude: 85.32051086425783))
the BaatoSwift.location.placeDetails
method can be used to make requests to the Places API.
let res = BaatoSwift.location.placeDetails(placeId: 102235)
the BaatoSwift.navigation.directions
method can be used to make requests to the Directions API.
BaatoSwift.navigation.directions(points: points, mode: BaatoNavigationMode.car, isInstructionEnable: true)
the BaatoSwift.navigation.mapBoxDirections
method can be used to make requests to the Directions API for consuming mapbox direction API.
BaatoSwift.navigation.mapBoxDirections(startPoint: CLLocationCoordinate2D(latitude: 27.724316366064567, longitude: 85.33965110778809), endPoint: CLLocationCoordinate2D(latitude: 27.7418, longitude: 85.3479), mode: .car)