Packages

t

ackcord.requests

BaseRESTRequest

trait BaseRESTRequest[RawResponse, NiceResponse] extends Request[RawResponse]

Base trait for all REST requests in AckCord. If you feel an endpoint is missing, and AckCord hasn't added it yet, you can extend this and create your own request. I'd recommend you to extend RESTRequest tough for simplicity.

RawResponse

The response type of the request

NiceResponse

A nicer and less raw type of response created from the response.

Self Type
BaseRESTRequest[RawResponse, NiceResponse]
Source
baseRequestObjs.scala
Linear Supertypes
Request[RawResponse], AnyRef, Any
Known Subclasses
BatchEditApplicationCommandPermissions, BulkOverwriteGlobalApplicationCommands, BulkOverwriteGuildApplicationCommands, CreateGlobalApplicationCommand, CreateGuildApplicationCommand, CreateInteractionResponse, DeleteGlobalApplicationCommand, DeleteGuildApplicationCommand, EditApplicationCommandPermissions, EditGlobalApplicationCommand, EditGuildApplicationCommand, GetApplicationCommandPermissions, GetGlobalApplicationCommand, GetGlobalApplicationCommands, GetGuildApplicationCommand, GetGuildApplicationCommandPermissions, GetGuildApplicationCommands, AddGuildMember, AddGuildMemberRole, AddThreadMember, BeginGuildPrune, BulkDeleteMessages, CreateChannelInvite, CreateDm, CreateFollowupMessage, CreateGuild, CreateGuildBan, CreateGuildChannel, CreateGuildEmoji, CreateGuildFromTemplate, CreateGuildRole, CreateGuildScheduledEvent, CreateGuildSticker, CreateGuildTemplate, CreateMessage, CreateReaction, CreateStageInstance, CreateWebhook, CrosspostMessage, DeleteAllReactions, DeleteAllReactionsForEmoji, DeleteChannelPermission, DeleteCloseChannel, DeleteGuild, DeleteGuildEmoji, DeleteGuildIntegration, DeleteGuildRole, DeleteGuildScheduledEvent, DeleteGuildSticker, DeleteGuildTemplate, DeleteInvite, DeleteMessage, DeleteOriginalWebhookMessage, DeleteOwnReaction, DeleteStageInstance, DeleteUserReaction, DeleteWebhook, DeleteWebhookMessage, DeleteWebhookWithToken, EditChannelPermissions, EditMessage, EditOriginalWebhookMessage, EditWebhookMessage, ExecuteWebhook, FollowNewsChannel, GetChannel, GetChannelInvites, GetChannelMessage, GetChannelMessages, GetChannelWebhooks, GetCurrentUser, GetCurrentUserGuilds, GetGuild, GetGuildAuditLog, GetGuildBan, GetGuildBans, GetGuildChannels, GetGuildEmoji, GetGuildIntegrations, GetGuildInvites, GetGuildMember, GetGuildPreview, GetGuildPruneCount, GetGuildRoles, GetGuildScheduledEvent, GetGuildScheduledEventUsers, GetGuildSticker, GetGuildTemplate, GetGuildTemplates, GetGuildVanityUrl, GetGuildVoiceRegions, GetGuildWebhooks, GetGuildWelcomeScreen, GetGuildWidget, GetGuildWidgetSettings, GetInvite, GetOriginalWebhookMessage, GetPinnedMessages, GetReactions, GetStageInstance, GetSticker, GetThreadMember, GetUser, GetUserConnections, GetWebhook, GetWebhookMessage, GetWebhookWithToken, GuildMemberRequest, JoinThread, LeaveGuild, LeaveThread, ListActiveGuildThreads, ListGuildEmojis, ListGuildMembers, ListGuildStickers, ListJoinedPrivateArchivedThreads, ListNitroStickerPacks, ListPrivateArchivedThreads, ListPublicArchivedThreads, ListScheduledEventsForGuild, ListThreadMembers, ListVoiceRegions, ModifyChannel, ModifyCurrentMember, ModifyCurrentUser, ModifyGuild, ModifyGuildChannelPositions, ModifyGuildEmoji, ModifyGuildMember, ModifyGuildRole, ModifyGuildRolePositions, ModifyGuildScheduledEvent, ModifyGuildSticker, ModifyGuildTemplate, ModifyGuildWelcomeScreen, ModifyGuildWidget, ModifyWebhook, ModifyWebhookWithToken, NoNiceResponseReasonRequest, NoNiceResponseRequest, NoParamsNiceResponseReasonRequest, NoParamsNiceResponseRequest, NoParamsReasonRequest, NoParamsRequest, NoParamsResponseReasonRequest, NoParamsResponseRequest, NoResponseReasonRequest, NoResponseRequest, GetCurrentAuthorizationInformation, GetCurrentBotApplicationInformation, PinMessage, RESTRequest, ReasonRequest, RemoveGuildBan, RemoveGuildMember, RemoveGuildMemberRole, RemoveThreadMember, SearchGuildMembers, StartThreadWithMessage, StartThreadWithoutMessage, SyncGuildTemplate, TriggerTypingIndicator, UnpinMessage, UpdateCurrentUserVoiceState, UpdateStageInstance, UpdateUserVoiceState, CreateGroupDm, ListActiveChannelThreads, ModifyBotUsersNick
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseRESTRequest
  2. Request
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def bodyForLogging: Option[String]

    Returns the body of this Request for use in logging.

    Returns the body of this Request for use in logging.

    Definition Classes
    Request
  2. abstract def requestBody: RequestEntity

    The body of the request to send.

    The body of the request to send.

    Definition Classes
    Request
  3. abstract def responseDecoder: Decoder[RawResponse]

    A decoder to decode the response.

  4. abstract def route: RequestRoute

    The router for this request.

    The router for this request.

    Definition Classes
    Request
  5. abstract def toNiceResponse(response: RawResponse): NiceResponse

    Convert the response to a format the cache handler can understand.

Concrete Value Members

  1. def collect[B](f: PartialFunction[RawResponse, B]): Request[B]

    Map the result if the function is defined for the response data.

    Map the result if the function is defined for the response data.

    Definition Classes
    Request
  2. def extraHeaders: Seq[HttpHeader]

    All the extra headers to send with this request.

    All the extra headers to send with this request.

    Definition Classes
    Request
  3. def filter(f: (RawResponse) => Boolean): Request[RawResponse]

    Filter the response of sending this request.

    Filter the response of sending this request.

    Definition Classes
    Request
  4. def hasPermissions(implicit c: CacheSnapshot): Boolean

    Check if a client has the needed permissions to execute this request.

    Check if a client has the needed permissions to execute this request.

    Definition Classes
    BaseRESTRequestRequest
  5. val identifier: UUID

    An unique identifier to track this request from creation to answer.

    An unique identifier to track this request from creation to answer.

    Definition Classes
    Request
  6. def map[B](f: (RawResponse) => B): Request[B]

    Map the result of sending this request.

    Map the result of sending this request.

    Definition Classes
    Request
  7. def parseResponse(entity: ResponseEntity)(implicit system: ActorSystem[Nothing]): Future[RawResponse]

    A flow that can be used to parse the responses from this request.

    A flow that can be used to parse the responses from this request.

    Definition Classes
    BaseRESTRequestRequest
  8. def requiredPermissions: Permission

    The permissions needed to use this request.

  9. def transformResponse[B](f: (ExecutionContext) => (Future[RawResponse]) => Future[B]): Request[B]

    Transform the response of this request as a flow.

    Transform the response of this request as a flow.

    Definition Classes
    Request