# HG changeset patch # User ioannis@ioannis-VirtualBox # Date 1621603614 -10800 # Node ID 74ff07f81f4aea3ac8e62d2f344ea40bd0944bc1 # Parent f192aa069261bee7eb986d0b9e5cc67b522346d0 Initial attempt to list measurements through the API. diff -r f192aa069261 -r 74ff07f81f4a scc_access/__init__.py --- a/scc_access/__init__.py Fri May 07 08:54:44 2021 +0300 +++ b/scc_access/__init__.py Fri May 21 16:26:54 2021 +0300 @@ -1,1 +1,1 @@ -__version__ = "0.10.4" \ No newline at end of file +__version__ = "0.11.0" \ No newline at end of file diff -r f192aa069261 -r 74ff07f81f4a scc_access/scc_access.py --- a/scc_access/scc_access.py Fri May 07 08:54:44 2021 +0300 +++ b/scc_access/scc_access.py Fri May 21 16:26:54 2021 +0300 @@ -520,42 +520,21 @@ return measurements - def list_measurements(self, station=None, system=None, start=None, stop=None, upload_status=None, - processing_status=None, optical_processing=None): + def list_measurements(self, id_exact=None, id_startswith=None): # TODO: Change this to work through the API # Need to set to empty string if not specified, we won't get any results - params = { - "station": station if station is not None else "", - "system": system if system is not None else "", - "stop": stop if stop is not None else "", - "start": start if start is not None else "", - "upload_status": upload_status if upload_status is not None else "", - "preprocessing_status": processing_status if processing_status is not None else "", - "optical_processing_status": optical_processing if optical_processing is not None else "" - } + params = {} - response_txt = self.session.get(self.list_measurements_url, params=params).text - tbl_rgx = re.compile(r'(.*?)
', re.DOTALL) - entry_rgx = re.compile(r'(.*?)', re.DOTALL) - measurement_rgx = re.compile( - r'.*?]*>(\w+).*?.*?([\w-]+ [\w:]+).*