private[this] def buildUrl()

in src/main/scala/com/gu/contentapi/mostviewedvideo/OphanStore.scala [33:41]


  private[this] def buildUrl(path: String, edition: Option[String], config: Config) =
    s"${config.ophanHost}$path?${buildCountryQuery(edition)}mins=${config.ophanMinutes}&api-key=${config.ophanKey}"

  private[this] def buildCountryQuery(edition: Option[String]) = {
    edition match {
      case Some(ed) => s"country=${capiEditionToOphanCountry(ed)}&"
      case None => ""
    }
  }