All Downloads are FREE. Search and download functionalities are using the official Maven repository.

contact.BiliBot.kt Maven / Gradle / Ivy

There is a newer version: 0.0.4-dev-1
Show newest version
package com.elouyi.bely.contact

import com.elouyi.bely.BiliBotFactory
import com.elouyi.bely.biliapi.BiliApi
import com.elouyi.bely.utils.ElyLogger
import io.ktor.client.*

/**
 * Bili 机器人,由[BiliBotFactory] 构造:
 * ```kotlin
 * val bot = BiliBotFactory.newBot(uid)
 * ```
 * @see WebBiliBot
 * @see AppBiliBot
 */
interface BiliBot : Contact {

    override val uid: Long

    val name: String

    val logger: ElyLogger

    val client: HttpClient

    /**
     * Bilibili 的 api
     */
    val biliApi: BiliApi

    /**
     * 进行登录操作,重置 auth 信息,除非明确需要手动刷新,一般用 [verifyAuth]
     * @see verifyAuth
     */
    suspend fun login()

    /**
     * 验证当前 auth 信息是否可用,不可用时自动更新
     */
    suspend fun verifyAuth()

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy