Packages

case class Requests(settings: RequestSettings, alsoProcessRequests: Sink[(Request[Data], RequestAnswer[Data]) forSome {type Data}, NotUsed] = Sink.ignore.mapMaterializedValue(_ => NotUsed))(implicit system: ActorSystem[Nothing]) extends Product with Serializable

A class holding all the relevant information to create a request stream. Also contains some convenience methods for common operations with requests.

This should be instantiated once per bot, and shared between shards.

Source
Requests.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Requests
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Requests(settings: RequestSettings, alsoProcessRequests: Sink[(Request[Data], RequestAnswer[Data]) forSome {type Data}, NotUsed] = Sink.ignore.mapMaterializedValue(_ => NotUsed))(implicit system: ActorSystem[Nothing])

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. val alsoProcessRequests: Sink[(Request[Data], RequestAnswer[Data]) forSome {type Data}, NotUsed]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def flow[Data, Ctx](implicit properties: RequestProperties = RequestProperties.default): FlowWithContext[Request[Data], Ctx, RequestAnswer[Data], Ctx, NotUsed]

    A generic flow for making requests.

    A generic flow for making requests. You should use this one most of the time. Backpressures before it hits a ratelimit.

    Some info on ordered requests. Once a response for one request has been received, the next one is sent. The next one is sent regardless of if the previous request failed. Ordered requests still have a few kinks that need to be removed before they always work.

  9. def flowSuccess[Data, Ctx](ignoreFailures: Boolean = true)(implicit properties: RequestProperties = RequestProperties.default): FlowWithContext[Request[Data], Ctx, Data, Ctx, NotUsed]

    A generic flow for making requests.

    A generic flow for making requests. Only returns successful requests.

    Backpressures before it hits a ratelimit.

    ignoreFailures

    If true, failures will be logged and then ignored. If false, throws the failures

  10. def flowWithoutRateLimits[Data, Ctx]: FlowWithContext[Request[Data], Ctx, RequestAnswer[Data], Ctx, NotUsed]

    A basic request flow which will send requests to Discord, and receive responses.

    A basic request flow which will send requests to Discord, and receive responses. Don't use this if you don't know what you're doing.

  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def many[Data](requests: Seq[Request[Data]])(implicit properties: RequestProperties = RequestProperties.default): Source[RequestAnswer[Data], NotUsed]

    Sends many requests

    Sends many requests

    requests

    The requests to send.

    returns

    A source of the request answers.

  14. def manyFuture[Data](requests: Seq[Request[Data]])(implicit properties: RequestProperties = RequestProperties.default): Future[Seq[RequestAnswer[Data]]]

    Sends many requests and gets the responses as a future.

    Sends many requests and gets the responses as a future.

    requests

    The requests to send.

  15. def manyFutureSuccess[Data](requests: Seq[Request[Data]])(implicit properties: RequestProperties = RequestProperties.default): Future[Seq[Data]]

    Sends many requests and gets the success response as a future if it's available.

    Sends many requests and gets the success response as a future if it's available. All the requests must succeed for this function to return a a value.

    requests

    The requests to send.

  16. def manyIgnore[Data](requests: Seq[Request[Data]])(implicit properties: RequestProperties = RequestProperties.default): Unit

    Sends many requests and ignores the result.

    Sends many requests and ignores the result.

    requests

    The requests to send.

  17. def manySuccess[Data](requests: Seq[Request[Data]], ignoreFailures: Boolean = true)(implicit properties: RequestProperties = RequestProperties.default): Source[Data, NotUsed]

    Sends many requests, and grabs the data if it's available.

    Sends many requests, and grabs the data if it's available.

    requests

    The requests to send.

    ignoreFailures

    If true, failures will be logged and then ignored. If false, throws the failures

    returns

    A source of the successful request answers.

  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  21. def productElementNames: Iterator[String]
    Definition Classes
    Product
  22. val settings: RequestSettings
  23. def single[Data](request: Request[Data])(implicit properties: RequestProperties = RequestProperties.default): Source[RequestAnswer[Data], NotUsed]

    Sends a single request.

    Sends a single request.

    request

    The request to send.

    returns

    A source of the single request answer.

  24. def singleFuture[Data](request: Request[Data])(implicit properties: RequestProperties = RequestProperties.default): Future[RequestAnswer[Data]]

    Sends a single request and gets the response as a future.

    Sends a single request and gets the response as a future.

    request

    The request to send.

  25. def singleFutureSuccess[Data](request: Request[Data])(implicit properties: RequestProperties = RequestProperties.default): Future[Data]

    Sends a single request and gets the success response as a future if it's available.

    Sends a single request and gets the success response as a future if it's available. If the request fails, the future fails.

    request

    The request to send.

  26. def singleIgnore[Data](request: Request[Data])(implicit properties: RequestProperties = RequestProperties.default): Unit

    Sends a single request and ignores the result.

    Sends a single request and ignores the result.

    request

    The request to send.

  27. def singleSuccess[Data](request: Request[Data])(implicit properties: RequestProperties = RequestProperties.default): Source[Data, NotUsed]

    Sends a single request, and grabs the data if it's available.

    Sends a single request, and grabs the data if it's available.

    request

    The request to send.

    returns

    A source of the successful request answer.

  28. def sinkIgnore[Data](implicit properties: RequestProperties = RequestProperties.default): Sink[Request[Data], Future[Done]]

    A generic sink for making requests and ignoring the results.

    A generic sink for making requests and ignoring the results.

    Backpressures before it hits a ratelimit.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. implicit val system: ActorSystem[Nothing]
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped