Latest 4.3
Homepage https://github.com/superpeteblaze/BikeProvider
License MIT
Platforms watchos 4.2, ios 9.0
Frameworks CoreLocation
Authors

CI Status
Version
License
Platform

Description

BikeProvider is a tiny, convenient library for retrieving relevant city bike share information.
Based on the user’s location, it uses the citybik.es API to to find the nearest city with bike share availability.
It can then return relevant bike station information such as station location and number of available bikes etc.

The framework was built to accommodate Bikey, my free bike share app available on the app store.

Requirements

Uses CoreLocation to retrieve location.

Installation

BikeProvider is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "BikeProvider"

Usage

  • Import the framework ‘import SPBBikeProvider’
  • Make a request (nearest city, stations etc.) and consume the response

Simple as that

Examples

Location

LocationProvider.sharedInstance.delegate = self
LocationProvider.sharedInstance.getLocation(withAuthScope: .authorizedWhenInUse)

…and in the location delegate…

func retrieved(location: CLLocation) {
  // Do something with the location here
}

Nearest city

CityProvider.city(near: location, onSuccess: { city in
  // Do something with the city here
}, onFailure: {
  // Oh no, something went wrong
})

Stations

StationProvider.stations(fromCityURL: city.url, onSuccess: { stations in
  // Do something with the stations here
}, onFailure: {
  // Oh no, something went wrong
})

See the sample project for fuller examples.

Sample app screenshot

Author

Pete Smith, [email protected]

License

BikeProvider is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "BikeProvider",
    "version": "4.3",
    "summary": "Tiny Swift provider for fetching city bike share information based on the citybik.es API",
    "description": "BikeProvider is a tiny, convenient framework for retrieving relevant city bike share information.nBased on the user's location, it uses the citybik.es API to to find the nearest city with bike share availability.nIt can then return relevant bike station information such as station location and number of available bikes etc.nnThe framework was built to accomodate Bikey, my bike share app available on the app store.",
    "homepage": "https://github.com/superpeteblaze/BikeProvider",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Pete Smith": "[email protected]"
    },
    "source": {
        "git": "https://github.com/superpeteblaze/BikeProvider.git",
        "tag": "v4.3"
    },
    "social_media_url": "https://twitter.com/superpeteblaze",
    "platforms": {
        "watchos": "4.2",
        "ios": "9.0"
    },
    "ios": {
        "source_files": "Code/**/*.{swift}"
    },
    "osx": {
        "source_files": "Code/**/*.{swift}"
    },
    "watchos": {
        "source_files": [
            "Code/Providers/*.{swift}",
            "Code/Model/*.{swift}",
            "Code/Location/*.{swift}",
            "Code/APIClient/*.{swift}",
            "Code/SupportingFiles/*.{swift}"
        ]
    },
    "frameworks": "CoreLocation"
}

Pin It on Pinterest

Share This