Fetch weather stations in cron from ftp server
This commit is contained in:
@@ -6,6 +6,7 @@ import org.typelevel.log4cats.Logger
|
||||
import org.typelevel.log4cats.slf4j.Slf4jLogger
|
||||
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
final case class LVGMCServerConfig(
|
||||
username: String,
|
||||
@@ -85,4 +86,8 @@ class FetchService(log: Logger[IO]) {
|
||||
} yield content
|
||||
}
|
||||
}
|
||||
|
||||
def fetchWeatherStations(): IO[String] = {
|
||||
fetchFile("Latvija_faktiskais_laiks.csv").map(result => new String(result, StandardCharsets.UTF_8))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user