1
0
Fork 0
e-ntfy-android/app/src/main/java/io/heckel/ntfy/data/Util.kt
2021-11-13 19:26:37 -05:00

9 lines
455 B
Kotlin

package io.heckel.ntfy.data
fun topicUrl(baseUrl: String, topic: String) = "${baseUrl}/${topic}"
fun topicUrlJson(baseUrl: String, topic: String, since: String) = "${topicUrl(baseUrl, topic)}/json?since=$since"
fun topicUrlJsonPoll(baseUrl: String, topic: String) = "${topicUrl(baseUrl, topic)}/json?poll=1"
fun topicShortUrl(baseUrl: String, topic: String) =
topicUrl(baseUrl, topic)
.replace("http://", "")
.replace("https://", "")