All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gu.crosswords.api.client.UriHelper.scala Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
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