Exemple #1
0
 def get(self, name):
     args = countries_parser.parse_args()
     limit = args['limit']
     limit = limit if limit is not None else DEFAULT_LIMIT
     stations = by_country(name, limit=limit, station_type=args['type'])
     if not stations:
         api.abort(404, "Country {} not found".format(name))
     return geojson(stations)
Exemple #2
0
 def get(self):
     args = stations_parser.parse_args()
     limit = args['limit']
     limit = limit if limit is not None else DEFAULT_LIMIT
     return geojson(stations(limit=limit, country=args['country'],
                                station_type=args['type']))
Exemple #3
0
 def get(self, station_id):
     abort_if_not_station(station_id)
     return geojson(station(station_id))