Preping for 1.0.0 release
This commit is contained in:
parent
cdba6b7597
commit
8fc2a01d5b
4 changed files with 9 additions and 9 deletions
12
README.md
12
README.md
|
@ -1,4 +1,4 @@
|
|||
[](https://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/cryptoprice/releases/latest) <!-- [](https://search.maven.org/search?q=g:%22net.thauvin.erik%22%20AND%20a:%22cryptoprice%22) --> [](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/cryptoprice/)
|
||||
[](https://opensource.org/licenses/BSD-3-Clause) [](https://github.com/ethauvin/cryptoprice/releases/latest) [](https://search.maven.org/search?q=g:%22net.thauvin.erik%22%20AND%20a:%22cryptoprice%22) <!-- [](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/cryptoprice/) -->
|
||||
|
||||
[](https://snyk.io/test/github/ethauvin/cryptoprice?targetFile=pom.xml) [](https://sonarcloud.io/dashboard?id=ethauvin_cryptoprice) [](https://github.com/ethauvin/cryptoprice/actions/workflows/gradle.yml) [](https://circleci.com/gh/ethauvin/cryptoprice/tree/master)
|
||||
|
||||
|
@ -9,10 +9,10 @@ A simple Kotlin/Java/Android implementation of the prices [Coinbase Public API](
|
|||
## Examples (TL;DR)
|
||||
|
||||
```kotlin
|
||||
import net.thauvin.erik.crypto.CryptoPrice.Companion.buyPrice
|
||||
import net.thauvin.erik.crypto.CryptoPrice.Companion.sellPrice
|
||||
import net.thauvin.erik.crypto.CryptoPrice.Companion.spotPrice
|
||||
|
||||
// ...
|
||||
|
||||
val btc = spotPrice("BTC") // Bitcoin
|
||||
println(btc.amount)
|
||||
|
||||
|
@ -31,7 +31,7 @@ To use with [Gradle](https://gradle.org/), include the following dependency in y
|
|||
|
||||
```gradle
|
||||
dependencies {
|
||||
implementation("net.thauvin.erik:cryptoprice:1.0.0-SNAPSHOT")
|
||||
implementation("net.thauvin.erik:cryptoprice:1.0.0")
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -99,7 +99,7 @@ println(price.toJson())
|
|||
{"data":{"base":"BTC","currency":"USD","amount":"34567.89"}}
|
||||
```
|
||||
|
||||
The `data` object matches the [Coinbase API](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices#get-spot-price). To specify a different (or no) key, use:
|
||||
The `data` object matches the [Coinbase API](https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-prices). To specify a different (or no) key, use:
|
||||
|
||||
```kotlin
|
||||
println(price.toJson("bitcoin"))
|
||||
|
@ -130,7 +130,7 @@ apiCall(listOf("exchange-rates"), mapOf("currency" to "usd"))
|
|||
will return something like:
|
||||
|
||||
```json
|
||||
{"data":{"currency":"BTC","rates":{"AED":"36.73","AFN":"589.50",...}}}
|
||||
{"data":{"currency":"BTC","rates":{"AED":"36.73","AFN":"589.50",…}}}
|
||||
```
|
||||
|
||||
See the [examples](https://github.com/ethauvin/cryptoprice/blob/master/examples/) for more details.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue