Skip to content

baato/BaatoSwift-Package

Repository files navigation

Baato Swift Package

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

Usage examples

Baato Swift Configuration

// 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.

Search API

the BaatoSwift.location.search method can be used to make requests to the Search API.


 let res = BaatoSwift.location.search(query: "s", limit: 10, type: "town")

Reverse Search API

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))

Places API

the BaatoSwift.location.placeDetails method can be used to make requests to the Places API.


  let res = BaatoSwift.location.placeDetails(placeId: 102235)

Directions API

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)

Mapbox directions API

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages