GetGuildMemberListApi

获取频道成员列表

用于获取 guild_id 指定的频道中所有成员的详情列表,支持分页。

有关返回结果的说明

  1. 在每次翻页的过程中,可能会返回上一次请求已经返回过的 member 信息,需要调用方自己根据 user id 来进行去重。

  2. 每次返回的 member 数量与 limit 不一定完全相等。翻页请使用最后一个 memberuser id 作为下一次请求的 after 参数,直到回包为空,拉取结束。

Author

ForteScarlet

Throws

Types

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun doRequest(client: HttpClient, server: Url, token: String, decoder: StringFormat): List<SimpleMember>

使用此api发起一次请求,并得到预期中的结果。

Link copied to clipboard
open suspend override fun doRequestRaw(client: HttpClient, server: Url, token: String): String

使用此api发起一次请求,并得到响应结果的字符串。

Link copied to clipboard
open fun post(resp: List<SimpleMember>)

当通过 doRequest 得到成功结果后进行的操作。

Link copied to clipboard
suspend fun <R> QQGuildApi<R>.request(client: HttpClient = QQGuildApi.DefaultHttpClient, server: Url, token: String, decoder: StringFormat = QQGuildApi.DefaultJsonDecoder): R

通过提供的参数,对此api进行请求并得到最终结果。

Link copied to clipboard
protected suspend fun requestForResponse(client: HttpClient, server: Url, token: String, json: Json = DefaultJsonDecoder): HttpResponse
Link copied to clipboard
protected inline suspend fun requestForText(client: HttpClient, server: Url, token: String, useResp: (HttpResponse) -> Unit = {}): String

通过 requestForResponse 得到响应,读取为文本并输出debug日志后返回。 不会进行校验。

Link copied to clipboard
suspend fun QQGuildApi<*>.requestRaw(client: HttpClient = QQGuildApi.DefaultHttpClient, server: Url, token: String): String

通过提供的参数,对此api进行请求并得到最终结果。

Link copied to clipboard
open override fun route(builder: RouteInfoBuilder)

此请求对应的api路由路径以及路径参数。 例如:/guild/list

Properties

Link copied to clipboard
open override val body: Any?

此次请求所发送的数据。为null则代表没有参数。

Link copied to clipboard
open override val method: HttpMethod

此api请求方式

Link copied to clipboard

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