Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making apiEndpoint and accessToken publicly readable #313

Merged
merged 2 commits into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes to the Mapbox Directions SDK for iOS

## master

* Added the `Directions.apiEndpoint` and `Directions.accessToken` properties that reflect the values passed into the `Directions` class’s initializers. ([#313](https://github.com/mapbox/MapboxDirections.swift/pull/313))

## v0.25.0

* Added `Directions.fetchAvailableOfflineVersions(completionHandler:)` for listing available offline versions. ([#303](https://github.com/mapbox/MapboxDirections.swift/pull/303))
Expand Down
12 changes: 8 additions & 4 deletions MapboxDirections/MBDirections.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ open class Directions: NSObject {
@objc(sharedDirections)
public static let shared = Directions(accessToken: nil)

/// The API endpoint to request the directions from.
internal var apiEndpoint: URL
/**
The API endpoint to use when requesting directions.
*/
@objc public private(set) var apiEndpoint: URL

/// The Mapbox access token to associate the request with.
internal let accessToken: String
/**
The Mapbox access token to associate with the request.
*/
@objc public let accessToken: String

/**
Initializes a newly created directions object with an optional access token and host.
Expand Down