def get_station_history_last(self, station, filter, amount, sort):
     """Last station communication history filter"""
     station = clean.station(station)
     filter = clean.filter(filter)
     sort = clean.sort(sort)
     path = f"/station/{station}/history/{filter}/last/{amount}/{sort}"
     return self.request_json("GET", path)
 def get_station_events(self, station, t_from, t_to, sort):
     """Station events from to"""
     station = clean.station(station)
     t_from, t_to = clean.time(t_from, t_to)
     sort = clean.sort(sort)
     path = f"/station/{station}/events/from/{t_from}/to/{t_to}/{sort}"
     return self.request_json("GET", path)
 def get_station_history(self, station, filter, t_from, t_to, sort):
     """Station communication history from to filter"""
     station = clean.station(station)
     filter = clean.filter(filter)
     t_from, t_to = clean.time(t_from, t_to)
     sort = clean.sort(sort)
     path = f"/station/{station}/history/{filter}/from/{t_from}/to/{t_to}/{sort}"
     return self.request_json("GET", path)
 def get_station_events_last(self, station, amount, sort):
     """Last station events"""
     station = clean.station(station)
     sort = clean.sort(sort)
     path = f"/station/{station}/events/last/{amount}/{sort}"
     return self.request_json("GET", path)
Beispiel #5
0
 def test_clean_sort(self):
     self.assertEqual(clean.sort("asc"), "asc")
     self.assertEqual(clean.sort("desc"), "desc")
     with self.assertRaises(AssertionError):
         clean.sort("other")