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

com.gu.contentapi.client.model.package.scala Maven / Gradle / Ivy

The newest version!
package com.gu.contentapi.client

import com.gu.contentapi.client.Decoder.PageableResponseDecoder
import com.twitter.scrooge.ThriftStruct

package object model {

  implicit class RichPageableResponse[R <: ThriftStruct, E](response: R)(implicit prd: PageableResponseDecoder[R, E]) {

    val impliesNoFurtherResults: Boolean = prd.elements(response).size < prd.pageSize(response)
  }

  private[model] def not[A](f: A => Boolean): A => Boolean = !f(_)

  private[model] val isPaginationParameter = Set("page")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy