Skip to content

Commit

Permalink
Add @jvmoverloads for ImageUrlExtensions and pull to 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Loic-Dumas committed Nov 3, 2023
1 parent 863a8dc commit d58f09e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object Config {

const val major = 0
const val minor = 7
const val patch = 1
const val patch = 2
const val versionName = "$major.$minor.$patch"

const val maven_group = "ch.srg.data.provider"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ import ch.srg.dataProvider.integrationlayer.data.ImageUrl
import ch.srg.dataProvider.integrationlayer.data.ImageUrlDecorator
import ch.srg.dataProvider.integrationlayer.request.IlHost

@JvmOverloads
fun ImageUrl.url(widthPixels: Int, ilHost: IlHost = IlHost.PROD): String {
val decorator = ImageUrlDecoratorInstances.getInstance(ilHost)
return url(decorator, widthPixels)
}

@JvmOverloads
fun ImageUrl.url(width: ImageWidth, ilHost: IlHost = IlHost.PROD): String {
return url(widthPixels = width.widthPixels, ilHost = ilHost)
}

@JvmOverloads
fun ImageUrl.url(imageSize: ImageSize, ilHost: IlHost = IlHost.PROD): String {
return url(width = imageSize.width, ilHost = ilHost)
}
Expand Down

0 comments on commit d58f09e

Please sign in to comment.