diff --git a/pybikes/cyclocity.py b/pybikes/cyclocity.py index fe7ac5776..b372163a2 100644 --- a/pybikes/cyclocity.py +++ b/pybikes/cyclocity.py @@ -5,6 +5,7 @@ import json from pybikes import BikeShareSystem, BikeShareStation, PyBikesScraper +from pybikes.utils import Bounded api_root = "https://api.jcdecaux.com/vls/v3/" @@ -16,7 +17,7 @@ } -class Cyclocity(BikeShareSystem): +class Cyclocity(Bounded, BikeShareSystem): sync = True @@ -32,8 +33,8 @@ class Cyclocity(BikeShareSystem): 'source': 'https://developer.jcdecaux.com' } - def __init__(self, tag, meta, contract, key): - super(Cyclocity, self).__init__(tag, meta) + def __init__(self, tag, meta, contract, key, bbox=None): + super(Cyclocity, self).__init__(tag, meta, bounds=bbox) self.contract = contract self.api_key = key self.stations_url = api_root + endpoints['stations'].format( diff --git a/pybikes/data/cyclocity.json b/pybikes/data/cyclocity.json index 36e34a4d2..379b48190 100644 --- a/pybikes/data/cyclocity.json +++ b/pybikes/data/cyclocity.json @@ -89,7 +89,8 @@ "longitude": 4.835659, "city": "Lyon" }, - "contract": "Lyon" + "contract": "Lyon", + "bbox": [[45.6235, 4.6715], [45.8900, 5.0098]] }, { "tag": "bicikelj",