def setPaginationConsistentWith()

in client/src/main/scala/com.gu.contentapi.client/model/Queries.scala [131:141]


  def setPaginationConsistentWith(response: TagsResponse): PaginatedApiQuery[TagsResponse, Tag] =
    pageSize.setIfUndefined(response.pageSize)

  def withParameters(parameterMap: Map[String, Parameter]) = copy(parameterMap)

  override def pathSegment: String = "tags"

  protected override def followingQueryGivenFull(response: TagsResponse, direction: Direction): Option[TagsQuery] = {
    val followingPage = response.currentPage + direction.delta
    if (followingPage >= 1 && followingPage <= response.pages) Some(page(followingPage)) else None
  }