InviteCreateRequest

class InviteCreateRequest @JvmOverloads constructor(guildId: ID? = null, channelId: ID? = null, duration: Int = DURATION_ONE_WEEK, settingTimes: Int = SETTING_TIMES_UNLIMITED) : KookPostRequest<InviteCreated>

创建邀请链接

/api/v3/invite/create

method POST

Constructors

Link copied to clipboard
fun InviteCreateRequest(guildId: ID? = null, channelId: ID? = null, duration: Int = DURATION_ONE_WEEK, settingTimes: Int = SETTING_TIMES_UNLIMITED)

Types

Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun request(client: HttpClient, authorization: String, decoder: Json = DEFAULT_JSON, postChecker: suspend (HttpResponse) -> Unit = {}): ApiResult

通过 client 执行网络请求并尝试得到结果。

Link copied to clipboard
open fun requestBlocking(client: HttpClient, authorization: String, decoder: Json = DEFAULT_JSON, postChecker: Consumer<HttpResponse> = defaultRequestPostChecker): ApiResult

通过 client 执行网络请求并尝试得到结果。

Link copied to clipboard
open suspend fun requestData(client: HttpClient, authorization: String, decoder: Json = DEFAULT_JSON): InviteCreated

通过 client 执行网络请求并尝试得到结果。

Link copied to clipboard
open fun requestDataBlocking(client: HttpClient, authorization: String, decoder: Json = DEFAULT_JSON): InviteCreated

通过 client 执行网络请求并尝试得到结果。

Properties

Link copied to clipboard
open val body: Any?

可以提供一个body实例。

Link copied to clipboard
open override val method: HttpMethod

此请求的 method.

Link copied to clipboard
open override val resultDeserializer: DeserializationStrategy<out InviteCreated>

得到响应值的反序列化器.

Link copied to clipboard
open override val url: Url

通过 apiPathsbuildParameters 懒构建 url 属性。