Packages

t

com.gu.contentapi.client

RetryableContentApiClient

trait RetryableContentApiClient extends ContentApiClient

Linear Supertypes
ContentApiClient, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RetryableContentApiClient
  2. ContentApiClient
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apiKey: String

    Your API key

    Your API key

    Definition Classes
    ContentApiClient
  2. abstract def backoffStrategy: BackoffStrategy
  3. implicit abstract def executor: ScheduledExecutor

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def get(url: String, headers: Map[String, String])(implicit context: ExecutionContext): Future[HttpResponse]

    Queries CAPI.

    Queries CAPI.

    This method must make a GET request to the CAPI endpoint and streamline the response into an HttpResponse object.

    It is a design decision that this method is virtual. Any implementation would have to rely on a specific technology stack, e.g. an HTTP client. Fundamentally, the responsibility of making these implementation choices should be pushed out to the end of the world.

    url

    The CAPI REST url

    headers

    Custom HTTP parameters

    returns

    an HttpResponse holding the response in the form of an array of bytes

    Definition Classes
    RetryableContentApiClientContentApiClient
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def getResponse[R <: ThriftStruct](query: ContentApiQuery[R])(implicit decoder: Decoder[R], context: ExecutionContext): Future[R]

    Runs the query against the Content API.

    Runs the query against the Content API.

    query

    the query

    returns

    a future resolving to an unmarshalled response

    Definition Classes
    ContentApiClient
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def paginate[R <: ThriftStruct, E, M](query: PaginatedApiQuery[R, E])(f: (R) ⇒ M)(implicit arg0: Decoder[R], context: ExecutionContext): Future[List[M]]

    Unfolds a query to its results, page by page

    Unfolds a query to its results, page by page

    R

    the response type expected for this query

    E

    the 'element' type for the list of elements returned in the response - eg 'Tag' for 'TagsResponse'

    M

    a type specified by the caller to summarise the results of each response. Eg, might be Seq[E]

    query

    the initial query

    f

    a result-processing function that converts the standard response type to the M type

    returns

    a future of a list of result-processed results (eg, if M = Seq[E], the final result is List[Seq[E]])

    Definition Classes
    ContentApiClient
  17. def paginateAccum[R <: ThriftStruct, E, M](query: PaginatedApiQuery[R, E])(f: (R) ⇒ M, g: (M, M) ⇒ M)(implicit arg0: Decoder[R], context: ExecutionContext): Future[M]

    Unfolds a query by accumulating its results - each response is transformed (by function f) and then combined (with function g) into a single accumulated result object.

    Unfolds a query by accumulating its results - each response is transformed (by function f) and then combined (with function g) into a single accumulated result object.

    R

    the response type expected for this query

    E

    the 'element' type for the list of elements returned in the response - eg 'Tag' for 'TagsResponse'

    M

    a type specified by the caller to summarise the results of each response. Eg, might be Seq[E]

    query

    the initial query

    f

    a result-processing function that converts the standard response type to the M type

    g

    a function that squashes together ('reduces') two M types - eg concatenates two Seq[E]

    returns

    a future of the accumulated value

    Definition Classes
    ContentApiClient
  18. def paginateFold[R <: ThriftStruct, E, M](query: PaginatedApiQuery[R, E])(m: M)(f: (R, M) ⇒ M)(implicit arg0: Decoder[R], context: ExecutionContext): Future[M]

    Unfolds a query by accumulating its results - each response is transformed and added to an accumulator value by a single folding function f.

    Unfolds a query by accumulating its results - each response is transformed and added to an accumulator value by a single folding function f.

    R

    the response type expected for this query

    E

    the 'element' type for the list of elements returned in the response - eg 'Tag' for 'TagsResponse'

    M

    a type specified by the caller to summarise the results the responses. Eg, might be Int

    query

    the initial query

    m

    an initial 'empty' starting value to begin the accumulation with. Eg, might be 0

    f

    a result-processing function that adds the result of a response to the summary value accumulated so far

    returns

    a future of the accumulated value

    Definition Classes
    ContentApiClient
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def targetUrl: String

    The url of the CAPI endpoint

    The url of the CAPI endpoint

    Definition Classes
    ContentApiClient
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. def url(contentApiQuery: ContentApiQuery[_]): String
    Definition Classes
    ContentApiClient
  23. def userAgent: String

    The user-agent identifier

    The user-agent identifier

    Definition Classes
    ContentApiClient
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from ContentApiClient

Inherited from AnyRef

Inherited from Any

Ungrouped