private def getSections()

in src/main/scala/lang/TypeaheadHelpersCapi.scala [188:196]


  private def getSections(str: String): Future[List[TextSuggestionOption]] =
    val query = str match
      case ""  => ContentApiClient.sections
      case str => ContentApiClient.sections.q(str)
    client.getResponse(query).map { response =>
      response.results.map { section =>
        TextSuggestionOption(section.webTitle, section.id, Some(section.webTitle))
      }.toList
    }