smnar

Types

Smnar = HttpClient
Servicio Meteorologico Nacional Argentina API Client https://www.smn.gob.ar
SmnarEndpoints = enum
  TiePre = "tiepre", Pron5D = "pron5d", RadSolar = "radsolar", Estaciones = "estaciones",
  DatoHorario = "datohorario", RegTemp = "regtemp", Alertas = "alertas"
Servicio Meteorologico Nacional Argentina API Endpoints. NO FUNCIONAN Pron5D y DatoHorario???.

Procs

proc downloadFile(this: Smnar; path: string; endpoint: SmnarEndpoints; unzip = true): string {...}{.raises: [
    Exception, SslError, OSError, IOError, ValueError, HttpRequestError, TimeoutError,
    ProtocolError, KeyError, Defect, OverflowError], tags: [RootEffect, ReadDirEffect,
    ReadEnvEffect, ReadIOEffect, WriteIOEffect, TimeEffect, WriteDirEffect].}
proc getEstadoActual(this: Smnar; fecha = now()): seq[JsonNode] {...}{.raises: [Exception,
    SslError, OSError, IOError, ValueError, HttpRequestError, TimeoutError,
    ProtocolError, KeyError, Defect, OverflowError, CsvError], tags: [ReadEnvEffect,
    ReadIOEffect, ReadDirEffect, RootEffect, WriteIOEffect, TimeEffect,
    WriteDirEffect].}
proc getEstaciones(this: Smnar): string {...}{.raises: [Exception, SslError, OSError,
    IOError, ValueError, HttpRequestError, TimeoutError, ProtocolError, KeyError,
    Defect, OverflowError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect,
                                RootEffect, WriteIOEffect, TimeEffect,
                                WriteDirEffect].}
proc getRadiacionSolar(this: Smnar; fecha = now() - days(1)): seq[JsonNode] {...}{.raises: [
    Exception, SslError, OSError, IOError, ValueError, HttpRequestError, TimeoutError,
    ProtocolError, KeyError, Defect, OverflowError, CsvError], tags: [ReadEnvEffect,
    ReadIOEffect, ReadDirEffect, RootEffect, WriteIOEffect, TimeEffect,
    WriteDirEffect].}
proc getTemperatura365(this: Smnar): seq[JsonNode] {...}{.raises: [Exception, SslError,
    OSError, IOError, ValueError, HttpRequestError, TimeoutError, ProtocolError,
    KeyError, Defect, OverflowError], tags: [ReadEnvEffect, ReadIOEffect,
    ReadDirEffect, RootEffect, WriteIOEffect, TimeEffect, WriteDirEffect].}
proc getAlertas365(this: Smnar): seq[string] {...}{.raises: [Exception, SslError, OSError,
    IOError, ValueError, HttpRequestError, TimeoutError, ProtocolError, KeyError,
    Defect, OverflowError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect,
                                RootEffect, WriteIOEffect, TimeEffect,
                                WriteDirEffect].}

Templates

template getLink(this: Smnar; endpoint: SmnarEndpoints): string