mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-07 16:40:43 +08:00
Add @since 2.11
for avatarUrl and AvatarSpec (for #1721)
This commit is contained in:
parent
7a9769b618
commit
1d60cf57b8
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019-2021 Mamoe Technologies and contributors.
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
@ -13,8 +13,8 @@ import net.mamoe.mirai.utils.MiraiInternalApi
|
||||
|
||||
/**
|
||||
* 头像的规格, [size] 单位为 px.
|
||||
* @since 2.11
|
||||
*/
|
||||
@Suppress("unused")
|
||||
public enum class AvatarSpec(@MiraiInternalApi public val size: Int) : Comparable<AvatarSpec> {
|
||||
/**
|
||||
* 最高压缩等级
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019-2021 Mamoe Technologies and contributors.
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
@ -44,6 +44,7 @@ public interface ContactOrBot : CoroutineScope {
|
||||
/**
|
||||
* 头像下载链接.
|
||||
* @param spec 头像的规格.
|
||||
* @since 2.11
|
||||
*/
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@JvmName("getAvatarUrl")
|
||||
|
@ -114,6 +114,7 @@ public interface Group : Contact, CoroutineScope, FileSupported, AudioSupported
|
||||
/**
|
||||
* 群头像下载链接.
|
||||
* @param spec 头像的规格.
|
||||
* @since 2.11
|
||||
*/
|
||||
public override fun avatarUrl(spec: AvatarSpec): String = "http://p.qlogo.cn/gh/${id}/${id}/${spec.size}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user