-
Notifications
You must be signed in to change notification settings - Fork 0
webservices
cortexmancer edited this page Jun 25, 2026
·
1 revision
Provides request functionalities to ANA HidroWebservices API
class HidroEndpoint(StrEnum)Enum to hold endpoins.
def request_hidro_ws(endpoint, headers, params={})Make a request to ANA API and returns the json.
def request_token(client_id: str,
client_password: str,
max_retries=3,
retry_delay=2)Request an token to ANA API and returns it.
def request_data(token: str, endpoint: HidroEndpoint,
params: dict) -> (bool, dict)Request data to ANA API and returns it.
def get_file_path(endpoint: HidroEndpoint, params: dict) -> strReturns file path to save returned json.