Skip to content

Commit

Permalink
Add options to tickers API as optional QueryMap.
Browse files Browse the repository at this point in the history
Bumped Kotlin version to 1.6.21 (and related KSP).
Bumped Gradle Wrapper version to 7.4.2
  • Loading branch information
mieszk3 committed May 30, 2022
1 parent 6b4ef69 commit 7c97e03
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
17 changes: 3 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
}
}
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.6.10"
id "com.google.devtools.ksp" version "1.6.10-1.0.2"
id "org.jetbrains.kotlin.jvm" version "1.6.21"
id "com.google.devtools.ksp" version "1.6.21-1.0.5"
id "maven-publish"
id "com.github.ben-manes.versions" version "0.39.0"
id 'com.autonomousapps.dependency-analysis' version "0.80.0"
Expand All @@ -21,11 +21,6 @@ repositories {
mavenCentral()
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

apply from: 'buildsystem/ci.gradle'

def isNonStable = { String version ->
Expand All @@ -40,12 +35,6 @@ tasks.named("dependencyUpdates").configure {
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
api 'com.squareup.retrofit2:retrofit:2.9.0'
api 'com.squareup.moshi:moshi-kotlin:1.12.0'
Expand Down
2 changes: 1 addition & 1 deletion buildsystem/ci.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ext {
siteUrl = 'https://github.com/coinpaprika/coinpaprika-api-kotlin-client'
gitUrl = 'https://github.com/coinpaprika/coinpaprika-api-kotlin-client.git'

libraryVersion = '0.5.2'
libraryVersion = '0.5.3'

developerId = 'coinpaprika'
developerName = 'CoinPaprika'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 5 additions & 2 deletions src/main/java/com/coinpaprika/apiclient/TickersService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ import com.coinpaprika.apiclient.entity.TickerEntity
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
import retrofit2.http.QueryMap

interface TickersService {
@GET("tickers/{id}/")
suspend fun getTicker(
@Path("id") id: String,
@Query("quotes") quotes: String
@Query("quotes") quotes: String,
@QueryMap options: Map<String, String> = emptyMap()
): TickerEntity

@GET("tickers")
suspend fun getTickers(
@Query("quotes") quotes: String,
@Query("page") page: Int? = null
@Query("page") page: Int? = null,
@QueryMap options: Map<String, String> = emptyMap()
): List<TickerEntity>
}

0 comments on commit 7c97e03

Please sign in to comment.