Пример #1
0
 def get_ancillary_data(self, uuid: str) -> CachedAncillaryDatum:
     response = requests.get(self.url_to('v1/ancillarydata/{}'.format(uuid)))
     handle_status(response)
     return from_dict(CachedAncillaryDatum, response.json())
Пример #2
0
 def get_media_camera_datetime(self, camera_id: str, date_time: str) -> List[Media]:
     # TODO Make this use python datetime objects
     response = requests.get(self.url_to('v1/media/camera/{}/{}'.format(camera_id, date_time)))
     handle_status(response)
     return [from_dict(Media, media_item) for media_item in response.json()]
Пример #3
0
 def get_media_uri(self, uri: str) -> Media:
     response = requests.get(self.url_to('v1/media/uri/{}'.format(uri)))
     handle_status(response)
     return from_dict(Media, response.json())
Пример #4
0
 def get_media_camera_timestamps(self, camera_id: str, start_time: str, end_time: str) -> List[Media]:
     response = requests.get(self.url_to('v1/media/camera/{}/{}/{}'.format(camera_id, start_time, end_time)))
     handle_status(response)
     return [from_dict(Media, media_item) for media_item in response.json()]
Пример #5
0
 def get_media_concurrent(self, uuid: str) -> List[Media]:
     response = requests.get(self.url_to('v1/media/concurrent/{}'.format(uuid)))
     handle_status(response)
     return [from_dict(Media, media_item) for media_item in response.json()]
Пример #6
0
 def get_media_videoreference_filename(self, filename: str) -> Media:
     response = requests.get(self.url_to('v1/media/videoreference/filename/{}'.format(filename)))
     handle_status(response)
     return from_dict(Media, response.json())
Пример #7
0
 def get_media_video(self, name: str) -> List[Media]:
     response = requests.get(self.url_to('v1/media/video/{}'.format(name)))
     handle_status(response)
     return [from_dict(Media, media_item) for media_item in response.json()]
Пример #8
0
 def get_vri_missioncontact(self, mission_contact: str) -> List[CachedVideoReferenceInfo]:
     response = requests.get(self.url_to('v1/videoreferences/missioncontact/{}'.format(mission_contact)))
     return [from_dict(CachedVideoReferenceInfo, vri_item) for vri_item in response.json()]
Пример #9
0
 def get_framegrab(self, camera_id: str, deployment_id: str, name: str):
     response = requests.get(self.url_to('v1/images/{}/{}/{}'.format(camera_id, deployment_id, name)))
     handle_status(response)
     return from_dict(ImageParams, response.json())
Пример #10
0
 def get_vri_videoreferenceuuid(self, uuid: str) -> List[CachedVideoReferenceInfo]:
     response = requests.get(self.url_to('v1/videoreferences/videoreference/{}'.format(uuid)))
     return [from_dict(CachedVideoReferenceInfo, vri_item) for vri_item in response.json()]
Пример #11
0
 def get_vri_uuid(self, uuid: str) -> CachedVideoReferenceInfo:
     response = requests.get(self.url_to('v1/videoreferences/{}'.format(uuid)))
     return from_dict(CachedVideoReferenceInfo, response.json())
Пример #12
0
 def get_vri_all(self, **params) -> List[CachedVideoReferenceInfo]:
     response = requests.get(self.url_to('v1/videoreferences/'), params=params)
     return [from_dict(CachedVideoReferenceInfo, vri_item) for vri_item in response.json()]
Пример #13
0
 def get_annotations_videoreference_chunked(self, uuid: str, **params) -> List[Observation]:
     response = requests.get(self.url_to('v1/annotations/videoreference/chunked/{}'.format(uuid)), params=params)
     return [from_dict(Observation, obs_item) for obs_item in response.json()]
Пример #14
0
 def get_annotation(self, uuid: str) -> Observation:
     response = requests.get(self.url_to('v1/annotations/{}'.format(uuid)))
     return from_dict(Observation, response.json())