https://github.com/nhomble/currency-layer-api
scala client for https://currencylayer.com/
https://github.com/nhomble/currency-layer-api
Last synced: 3 months ago
JSON representation
scala client for https://currencylayer.com/
- Host: GitHub
- URL: https://github.com/nhomble/currency-layer-api
- Owner: nhomble
- Created: 2017-06-13T05:30:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T08:13:09.000Z (almost 8 years ago)
- Last Synced: 2025-01-21T00:47:29.194Z (5 months ago)
- Language: Scala
- Size: 28.3 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# currency-layer-api
scala client for https://currencylayer.com/[](https://travis-ci.org/nhomble/currency-layer-api)
[](https://codecov.io/gh/nhomble/currency-layer-api)
```scala
package org.hombro.currencylayerimport scala.util.{Failure, Success}
object Driver {
def main(args: Array[String]): Unit = {
val apiKey = "YOUR API KEY - NOT MINE"
val client = CurrencyLayerClient.client(apiKey)
client.liveRate() match {
case Failure(e) => throw e
case Success(out) =>
val quote = out.quotes.head
print(s"Response: ${quote.currency} ${quote.rate}")
}
}
}
```