Class HeyBoxConfig
- Namespace
- HeyBox
- Assembly
- HeyBox.Net.Core.dll
定义 HeyBox.Net 各种基础行为的配置项。
public class HeyBoxConfig
- Inheritance
-
HeyBoxConfig
- Derived
- Inherited Members
Fields
APIUrl
获取黑盒语音 API 请求的根 URL。
public const string APIUrl = "https://chat.xiaoheihe.cn/"
Field Value
APIVersion
获取 HeyBox.Net 使用的 API 版本。
public const int APIVersion = 2
Field Value
ChatVersion
获取黑盒语音的版本号。
public const string ChatVersion = "1.29.0"
Field Value
CreateAssetAPIUrl
获取黑盒语音上传媒体文件 API 请求的根 URL。
public const string CreateAssetAPIUrl = "https://chat-upload.xiaoheihe.cn/"
Field Value
DefaultRequestTimeout
获取请求超时的默认时间,以毫秒为单位。
public const int DefaultRequestTimeout = 6000
Field Value
MaxRoomsPerBatchByDefault
获取黑盒语音允许在每个请求中获取的最大房间数量。
public const int MaxRoomsPerBatchByDefault = 20
Field Value
Properties
CommonQueryParameters
获取用于 API 请求的公共查询参数。
public static NameValueCollection CommonQueryParameters { get; }
Property Value
CommonQueryString
获取用于 API 请求的公共查询参数的字符串表示形式。
public static string CommonQueryString { get; }
Property Value
DefaultRatelimitCallback
获取或设置默认的速率限制回调委托。
public Func<IRateLimitInfo, Task>? DefaultRatelimitCallback { get; set; }
Property Value
Remarks
若同时设置了此属性与用于各个请求的 RatelimitCallback,则将优先使用 RatelimitCallback。
DefaultRetryMode
获取或设置请求在出现错误时的默认行为。
public RetryMode DefaultRetryMode { get; set; }
Property Value
- See Also
LogLevel
获取或设置将发送到日志事件的最低日志严重性级别。
public LogSeverity LogLevel { get; set; }
Property Value
UserAgent
获取 HeyBox.Net 在每个请求中使用的用户代理。
public static string UserAgent { get; }
Property Value
Version
获取 HeyBox.Net 使用的默认请求超时时间。
public static string Version { get; }
Property Value
- string
一个包含详细版本信息的字符串,包括构建号;当无法获取构建版本时为
Unknown
。