Interface: RouteOptions
@sapphire/plugin-api.RouteOptions
Hierarchy
Options
↳
RouteOptions
Properties
acceptedContentMimeTypes
• Optional
acceptedContentMimeTypes: null
| (`message/${string}` | `audio/${string}` | `video/${string}` | `image/${string}` | `text/${string}` | `application/${string}` | `multipart/${string}` | `X-${string}/${string}`)[]
The accepted content types for this route. If set to null, the route will accept any data.
Since
1.3.0
Default
this.context.server.options.acceptedContentMimeTypes ?? null
Defined in
projects/plugins/packages/api/src/lib/structures/Route.ts:107
enabled
• Optional
Readonly
enabled: boolean
Whether or not the piece should be enabled. If set to false, the piece will be unloaded.
Default
true
Inherited from
Piece.Options.enabled
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:420
maximumBodyLength
• Optional
maximumBodyLength: number
(RFC 7230 3.3.2) The maximum decimal number of octets.
Since
1.0.0
Default
this.context.server.options.maximumBodyLength ?? 1024 * 1024 * 50
Defined in
projects/plugins/packages/api/src/lib/structures/Route.ts:100
name
• Optional
Readonly
name: string
The name for the piece.
Default
''
Inherited from
Piece.Options.name
Defined in
node_modules/@sapphire/pieces/dist/index.d.ts:415
route
• Optional
route: string
The route the piece should represent.
Since
1.0.0
Default
''
Example
'/users'
// request.params -> {}
Example
'/guilds/:guild/members/:member/'
// request.params -> { guild: '...', member: '...' }
Defined in
projects/plugins/packages/api/src/lib/structures/Route.ts:93