com.gu.crosswords.api.client.UriHelper.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of crosswords-api-client_2.11 Show documentation
Show all versions of crosswords-api-client_2.11 Show documentation
Scala client for the Guardian's Crosswords API
package com.gu.crosswords.api.client
import org.joda.time.LocalDate
import com.gu.crosswords.api.client.models.Type
object UriHelper {
def forDate(endpoint: String, date: LocalDate, apiKey: String): String =
s"$endpoint/${date.toString()}.json?api-key=$apiKey"
def forCrossword(endpoint: String, crosswordType: Type, id: Int, apiKey: String): String =
s"$endpoint/${Type.byType(crosswordType)}/$id.json?api-key=$apiKey"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy