Sparkle
  1. 能力
Sparkle
  • API
    • BanHistory 封禁历史
      • 查询最近封禁记录
      • 复杂查询封禁记录
    • ClientDiscovery 客户端发现
      • 查询最近新客户端发现记录
      • 复杂查询客户端发现记录
    • Snapshot 快照记录
      • 查询最近快照
      • 复杂查询快照记录
    • UserApplication 用户应用程序
      • 列出我的用户应用程序
      • 获取指定用户应用程序信息
      • 重置指定用户应用程序的 AppSecret
      • 编辑指定用户应用程序
      • 创建新的用户应用程序
      • 删除指定用户应用程序
    • User 用户
      • 用户个人基本信息
      • 读取指定用户个人基本信息
      • 登出会话
    • Github OAuth2 登录
      GET
  • BTN兼容客户端协议通讯
    • 能力
      • 提交 Peers
        GET
      • 提交 Bans
        GET
      • 请求云端规则
        GET
    • 请求 BTN 配置文件
      GET
  1. 能力

提交 Peers

开发中
GET
/ping/peers/submit
提交成功时,返回 200 状态码,空响应体

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json
populate_time
integer 
数据生成时间
必需
peers
array[object (BTN Peer) {13}] 
必需
ip_address
string 
IP 地址
必需
peer_port
integer 
Peer 端口号
必需
peer_id
string 
Peer ID
必需
可能为空串;可能是裁切过的也可能是完整的,取决于客户端和下载器的实现
client_name
string 
客户端名称
必需
可能为空串
torrent_identifier
string 
种子识别码
必需
不是 info_hash
torrent_size
integer 
种子大小
必需
bytes
downloaded
integer 
从 Peer 下载的数据量
必需
bytes
rt_download_speed
integer 
从 Peer 下载的速率
必需
bytes/s
uploaded
integer 
向 Peer 上传的数据量
必需
bytes
rt_upload_speed
integer 
向 Peer 上传的速率
必需
bytes/s
peer_progress
number 
Peer 汇报进度
必需
浮点型 1.0=100%
downloader_progress
integer 
用户下载器进度
必需
浮点型 1.0=100%
peer_flag
string 
uTP Flags
必需
可能为空串
示例
{
	"populate_time": 1713971696000,
	"peers": [{
			"ip_address": "CE67:2B6F:646A:138B:9E4F:DD47:894E:608E",
			"peer_port": 12345,
			"peer_id": "-BC1234-",
			"client_name": "BitComet 1.2.3.4",
			"torrent_identifier": "<使用特定算法对 info_hash 进行加盐哈希>",
			"torrent_size": 12346789765,
			"downloaded": 3463465,
			"rt_download_speed": 133525,
			"uploaded": 2345754,
			"rt_upload_speed": 234456465,
			"peer_progress": 0.1245,
			"downloader_progress": 1,
			"peer_flag": "u I H X E P"
		},
		{
			"ip_address": "198.148.143.87",
			"peer_port": 23333,
			"peer_id": "-qB2312-",
			"client_name": "qBittorrent 2.3.1.2",
			"torrent_identifier": "<使用特定算法对 info_hash 进行加盐哈希>",
			"torrent_size": 12346789765,
			"downloaded": 3463465,
			"rt_download_speed": 133525,
			"uploaded": 2345754,
			"rt_upload_speed": 234456465,
			"peer_progress": 0.1245,
			"downloader_progress": 1,
			"peer_flag": "u I H X E P"
		}
	]
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://btn-prod.ghostchu-services.top/ping/peers/submit' \
--header 'Content-Type: application/json' \
--data-raw '{
	"populate_time": 1713971696000,
	"peers": [{
			"ip_address": "CE67:2B6F:646A:138B:9E4F:DD47:894E:608E",
			"peer_port": 12345,
			"peer_id": "-BC1234-",
			"client_name": "BitComet 1.2.3.4",
			"torrent_identifier": "<使用特定算法对 info_hash 进行加盐哈希>",
			"torrent_size": 12346789765,
			"downloaded": 3463465,
			"rt_download_speed": 133525,
			"uploaded": 2345754,
			"rt_upload_speed": 234456465,
			"peer_progress": 0.1245,
			"downloader_progress": 1,
			"peer_flag": "u I H X E P"
		},
		{
			"ip_address": "198.148.143.87",
			"peer_port": 23333,
			"peer_id": "-qB2312-",
			"client_name": "qBittorrent 2.3.1.2",
			"torrent_identifier": "<使用特定算法对 info_hash 进行加盐哈希>",
			"torrent_size": 12346789765,
			"downloaded": 3463465,
			"rt_download_speed": 133525,
			"uploaded": 2345754,
			"rt_upload_speed": 234456465,
			"peer_progress": 0.1245,
			"downloader_progress": 1,
			"peer_flag": "u I H X E P"
		}
	]
}'

返回响应

🟢200成功
text/plain
Body
object {0}
修改于 2024-08-17 18:57:18
上一页
Github OAuth2 登录
下一页
提交 Bans
Built with