Skip to content

Commit e86e1b2

Browse files
committed
add bounds to ganxeta
stations that are under maintenance get invalid lat/lngs
1 parent edc1735 commit e86e1b2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pybikes/data/ganxeta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"instances": [
33
{
44
"tag": "ganxeta-reus",
5+
"bounds": [[41.0760, 1.0072], [41.2281, 1.2064]],
56
"meta": {
67
"city": "Reus",
78
"name": "Ganxeta",

pybikes/ganxeta.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
import json
55

66
from pybikes import BikeShareSystem, BikeShareStation, PyBikesScraper
7+
from pybikes.utils import Bounded
78

89
ENDPOINT = "https://bks-api.ganxeta.cat/rms-bike-sharing-real-time/graphql"
910

1011

11-
class Ganxeta(BikeShareSystem):
12+
class Ganxeta(Bounded, BikeShareSystem):
1213
headers = {
1314
"Content-Type": "application/json; charset=utf-8",
1415
}
@@ -39,9 +40,6 @@ class Ganxeta(BikeShareSystem):
3940
}""",
4041
}
4142

42-
def __init__(self, tag, meta):
43-
super(Ganxeta, self).__init__(tag, meta)
44-
4543
def update(self, scraper=None):
4644
scraper = scraper or PyBikesScraper()
4745
data = scraper.request(

0 commit comments

Comments
 (0)