Preping for 1.0.0 release

This commit is contained in:
Erik C. Thauvin 2022-09-09 11:54:20 -07:00
parent cdba6b7597
commit 8fc2a01d5b
4 changed files with 9 additions and 9 deletions

View file

@ -1,4 +1,4 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![Release](https://img.shields.io/github/release/ethauvin/cryptoprice.svg)](https://github.com/ethauvin/cryptoprice/releases/latest) <!-- [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/cryptoprice.svg?label=maven%20central&color=blue)](https://search.maven.org/search?q=g:%22net.thauvin.erik%22%20AND%20a:%22cryptoprice%22) --> [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/cryptoprice?server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/cryptoprice/) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![Release](https://img.shields.io/github/release/ethauvin/cryptoprice.svg)](https://github.com/ethauvin/cryptoprice/releases/latest) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/cryptoprice.svg?label=maven%20central&color=blue)](https://search.maven.org/search?q=g:%22net.thauvin.erik%22%20AND%20a:%22cryptoprice%22) <!-- [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/cryptoprice?server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/cryptoprice/) -->
[![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/cryptoprice/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/ethauvin/cryptoprice?targetFile=pom.xml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_cryptoprice&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_cryptoprice) [![GitHub CI](https://github.com/ethauvin/cryptoprice/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/cryptoprice/actions/workflows/gradle.yml) [![CircleCI](https://circleci.com/gh/ethauvin/cryptoprice/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/cryptoprice/tree/master) [![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/cryptoprice/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/ethauvin/cryptoprice?targetFile=pom.xml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_cryptoprice&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_cryptoprice) [![GitHub CI](https://github.com/ethauvin/cryptoprice/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/cryptoprice/actions/workflows/gradle.yml) [![CircleCI](https://circleci.com/gh/ethauvin/cryptoprice/tree/master.svg?style=shield)](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) ## Examples (TL;DR)
```kotlin ```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 import net.thauvin.erik.crypto.CryptoPrice.Companion.spotPrice
// ...
val btc = spotPrice("BTC") // Bitcoin val btc = spotPrice("BTC") // Bitcoin
println(btc.amount) println(btc.amount)
@ -31,7 +31,7 @@ To use with [Gradle](https://gradle.org/), include the following dependency in y
```gradle ```gradle
dependencies { 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"}} {"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 ```kotlin
println(price.toJson("bitcoin")) println(price.toJson("bitcoin"))
@ -130,7 +130,7 @@ apiCall(listOf("exchange-rates"), mapOf("currency" to "usd"))
will return something like: will return something like:
```json ```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. See the [examples](https://github.com/ethauvin/cryptoprice/blob/master/examples/) for more details.

View file

@ -22,7 +22,7 @@ defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
description = "Retrieve cryptocurrencies prices." description = "Retrieve cryptocurrencies prices."
group = "net.thauvin.erik" group = "net.thauvin.erik"
version = "1.0.0-SNAPSHOT" version = "1.0.0"
val deployDir = "deploy" val deployDir = "deploy"
val gitHub = "ethauvin/$name" val gitHub = "ethauvin/$name"

View file

@ -20,7 +20,7 @@ repositories {
} }
dependencies { dependencies {
implementation("net.thauvin.erik:cryptoprice:1.0.0-SNAPSHOT") implementation("net.thauvin.erik:cryptoprice:1.0.0")
implementation("org.json:json:20220320") implementation("org.json:json:20220320")
} }

View file

@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.thauvin.erik</groupId> <groupId>net.thauvin.erik</groupId>
<artifactId>cryptoprice</artifactId> <artifactId>cryptoprice</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0</version>
<name>cryptoprice</name> <name>cryptoprice</name>
<description>Retrieve cryptocurrencies prices.</description> <description>Retrieve cryptocurrencies prices.</description>
<url>https://github.com/ethauvin/cryptoprice</url> <url>https://github.com/ethauvin/cryptoprice</url>