abstract class Service[F[_]] extends AnyRef
- Alphabetic
- By Inheritance
- Service
- AnyRef
- Any
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Service(authToken: Header)(implicit client: Client[F], F: Sync[F])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ->[B](y: B): (Service[F], B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val F: Sync[F]
- Attributes
- protected
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val authToken: Header
- Attributes
- protected
- implicit val client: Client[F]
- Attributes
- protected
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def delete(uri: Uri, extraHeaders: Header*): F[Unit]
An idempotent delete.
An idempotent delete. If NotFound or Gone are returned this method will succeed.
- uri
the uri to which the request will be made.
- extraHeaders
extra headers to be used. The
authToken
header is always added.
- Attributes
- protected
- val dsl: Http4sClientDsl[F]
- Attributes
- protected
- def ensuring(cond: (Service[F]) => Boolean, msg: => Any): Service[F]
- def ensuring(cond: (Service[F]) => Boolean): Service[F]
- def ensuring(cond: Boolean, msg: => Any): Service[F]
- def ensuring(cond: Boolean): Service[F]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def expect[R](wrappedAt: Option[String], method: Method with PermitsBody, uri: Uri, extraHeaders: Header*)(implicit arg0: Decoder[R]): F[R]
Invokes
method
on the specifieduri
without any body.Invokes
method
on the specifieduri
without any body. The response will be parsed to anR
.- wrappedAt
whether to decode
R
at the Json root, or at the fieldat
.- method
the method to use, eg: GET, POST, etc.
- uri
the uri to which the request will be made.
- extraHeaders
extra headers to be used. The
authToken
header is always added.
- Attributes
- protected
- def expect[B, R](wrappedAt: Option[String], method: Method with PermitsBody, value: B, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[B], arg1: Decoder[R]): F[R]
Invokes
method
on the specifieduri
passing as bodyvalue
.Invokes
method
on the specifieduri
passing as bodyvalue
. The response will be parsed to anR
.- wrappedAt
whether to encode
B
and decodeR
at the Json root, or at the fieldat
.- method
the method to use, eg: GET, POST, etc.
- value
the value to send in the body. This value will be json encoded using
wrapped
.- uri
the uri to which the request will be made.
- extraHeaders
extra headers to be used. The
authToken
header is always added.
- Attributes
- protected
- def expectUnwrapped[R](wrappedAt: Option[String], request: F[Request[F]])(implicit arg0: Decoder[R]): F[R]
Submits
request
and decodes the response to aR
on success.Submits
request
and decodes the response to aR
on success.- wrappedAt
whether to decode
R
at the Json root, or at the fieldat
.- request
the request to execute.
- Attributes
- protected
- def formatted(fmtstr: String): String
- def get[R](wrappedAt: Option[String], uri: Uri, extraHeaders: Header*)(implicit arg0: Decoder[R]): F[R]
- Attributes
- protected
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def jsonDecoder[A](implicit arg0: Decoder[A]): EntityDecoder[F, A]
- Attributes
- protected
- implicit def jsonEncoder[A](implicit arg0: Encoder[A]): EntityEncoder[F, A]
- Attributes
- protected
- val jsonPrinter: Printer
- Attributes
- protected
- def list[R](wrappedAt: String, uri: Uri, query: Query, extraHeaders: Header*)(implicit arg0: Decoder[R]): Stream[F, R]
Invokes a GET request on the specified
uri
, expecting the returned json to be paginated.Invokes a GET request on the specified
uri
, expecting the returned json to be paginated. Automatically fetches more pages if more elements of the stream are consumed.- R
the type of the elements returned.
- wrappedAt
the Json object field where
R
will be decoded from.- uri
the uri to which the request will be made.
- query
extra query parameters to pass in every request. These are separated from Uri because this method will need to append query params for the next page/marker/offset.
- extraHeaders
extra headers to be used. The
authToken
header is always added.
- Attributes
- protected
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def patch[V, R](wrappedAt: Option[String], value: V, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[V], arg1: Decoder[R]): F[R]
- Attributes
- protected
- def post[V, R](wrappedAt: Option[String], value: V, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[V], arg1: Decoder[R]): F[R]
- Attributes
- protected
- def put[V, R](wrappedAt: Option[String], value: V, uri: Uri, extraHeaders: Header*)(implicit arg0: Encoder[V], arg1: Decoder[R]): F[R]
- Attributes
- protected
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unwrapped[R](at: Option[String] = None)(implicit decoder: Decoder[R]): EntityDecoder[F, R]
Creates an
EntityDecoder
which will decode the response from Json.Creates an
EntityDecoder
which will decode the response from Json. Whenat
isNone
R
will be decoded directly from the Json root (the normal implementation for most Json REST APIs). Example:{ "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba", "zones": 500, "zone_recordsets": 500 }
When
at
is aSome(x)
R
will be decoded from the Json object located in the fieldx
. ForR
to be correctly parsed in this exampleat
should be Some("quota"):{ "quota": { "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba", "zones": 500, "zone_recordsets": 500 } }
- at
whether to decode
R
at the Json root, or at the fieldat
.- decoder
the circe decoder capable of converting Json to an R.
- Attributes
- protected
- implicit val void: EntityDecoder[F, Unit]
- Attributes
- protected
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def wrapped[R](at: Option[String] = None)(implicit encoder: Encoder[R]): EntityEncoder[F, R]
Creates an
EntityEncoder
which will encodeR
to a Json.Creates an
EntityEncoder
which will encodeR
to a Json. Whenat
isNone
R
will be encoded directly (the normal implementation for most Json REST APIs). Example:{ "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba", "zones": 500, "zone_recordsets": 500 }
When
at
is aSome(x)
R
will be encoded inside a Json object with a single field namedx
. In this exampleat
was set to Some("quota"):{ "quota": { "id": "e4d02828-9cac-4765-bf7f-7e210dac7aba", "zones": 500, "zone_recordsets": 500 } }
- at
whether to encode
R
at the Json root, or at the fieldat
.- encoder
the circe encoder capable of converting an R to Json.
- Attributes
- protected
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def →[B](y: B): (Service[F], B)
- Implicit
- This member is added by an implicit conversion from Service[F] toArrowAssoc[Service[F]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.