<commit_before>package notification.services.guardian
import models.{PlatformCount, Topic}
import play.api.libs.ws.WSClient
import utils.LruCache

import scala.concurrent.{ExecutionContext, Future}
import scala.concurrent.duration.DurationLong

class ReportTopicRegistrationCounter(
  ws: WSClient,
  registrationCounterUrl: String
)(implicit ec: ExecutionContext) extends TopicRegistrationCounter {

  val lruCache: LruCache[PlatformCount] = new LruCache[PlatformCount](200, 1000, 3.days)

  override def count(topics: List[Topic]): Future[PlatformCount] = {
    lruCache(topics.toSet) {
      val topicParameters = topics.map(t => "t" -> t.toString)
      ws.url(registrationCounterUrl)
        .withQueryStringParameters(topicParameters: _*)
        .get
        .map(response => response.json.as[PlatformCount])
    }
  }
}<commit_msg>Use the actual parameter name<commit_after>package notification.services.guardian
import models.{PlatformCount, Topic}
import play.api.libs.ws.WSClient
import utils.LruCache

import scala.concurrent.{ExecutionContext, Future}
import scala.concurrent.duration.DurationLong

class ReportTopicRegistrationCounter(
  ws: WSClient,
  registrationCounterUrl: String
)(implicit ec: ExecutionContext) extends TopicRegistrationCounter {

  val lruCache: LruCache[PlatformCount] = new LruCache[PlatformCount](200, 1000, 3.days)

  override def count(topics: List[Topic]): Future[PlatformCount] = {
    lruCache(topics.toSet) {
      val topicParameters = topics.map(topic => "topics" -> topic.toString)
      ws.url(registrationCounterUrl)
        .withQueryStringParameters(topicParameters: _*)
        .get
        .map(response => response.json.as[PlatformCount])
    }
  }
}
{'fraction_non_alphanumeric': 0.10310486233157587, 'fraction_numerical': 0.009373169302870533, 'mean_word_length': 4.9100346020761245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2501429', 'n_tokens_mistral': 520, 'n_tokens_neox': 492, 'n_words': 100}