https://api.staryun.shop/API/yykp.php
https://api.staryun.shop/API/yykp.php
生成QQ音乐卡片,调用框架的发送卡片即可发送,采用CzAPI
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string |
是 | 分享平台:qq,163,kugou,kuwo,migu |
| url | string |
是 | 跳转链接(必填) |
| audio | string |
是 | 音乐文件(必填) |
| title | string |
否 | 卡片标题(必填) |
| desc | string |
否 | 卡片内容(可选) |
| image | string |
是 | 卡片图片(必填) |
| apikey | string |
是 | 你的key |
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功,服务器已成功处理了请求。 |
| 403 | 服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。 |
| 404 | 请求的资源未找到。请检查您的请求地址是否正确。 |
| 429 | 请求过于频繁。您已超出速率限制,请稍后再试。 |
| 500 | 服务器内部错误。服务器在执行请求时遇到了问题。 |
// 点击"立即测试"按钮查看接口响应 // 响应将显示在此处...
<?php
$url = 'https://api.staryun.shop/API/yykp.php';
$params = [
'type' => 'YOUR_VALUE',
'url' => 'YOUR_VALUE',
'audio' => 'YOUR_VALUE',
'title' => 'YOUR_VALUE',
'desc' => 'YOUR_VALUE',
'image' => 'YOUR_VALUE',
'apikey' => 'YOUR_VALUE',
];
// 构建查询字符串
$queryString = http_build_query($params);
$requestUrl = $url . ($queryString ? '?' . $queryString : '');
// 发起请求
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $requestUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
if ($response === false) {
echo 'Error: ' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
url = "https://api.staryun.shop/API/yykp.php"
params = {
"type": "YOUR_VALUE",
"url": "YOUR_VALUE",
"audio": "YOUR_VALUE",
"title": "YOUR_VALUE",
"desc": "YOUR_VALUE",
"image": "YOUR_VALUE",
"apikey": "YOUR_VALUE",
}
try:
response = requests.get(url, params=params, timeout=30)
response.raise_for_status()
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
const url = 'https://api.staryun.shop/API/yykp.php';
const params = {
'type': 'YOUR_VALUE',
'url': 'YOUR_VALUE',
'audio': 'YOUR_VALUE',
'title': 'YOUR_VALUE',
'desc': 'YOUR_VALUE',
'image': 'YOUR_VALUE',
'apikey': 'YOUR_VALUE',
};
// 构建查询字符串
const queryString = new URLSearchParams(params).toString();
const requestUrl = url + (queryString ? '?' + queryString : '');
// 发起请求
fetch(requestUrl)
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.text();
})
.then(data => {
console.log(data);
})
.catch(error => {
console.error('Error:', error);
});
curl "https://api.staryun.shop/API/yykp.php" \
-G --data-urlencode "type=YOUR_VALUE" \
-G --data-urlencode "url=YOUR_VALUE" \
-G --data-urlencode "audio=YOUR_VALUE" \
-G --data-urlencode "title=YOUR_VALUE" \
-G --data-urlencode "desc=YOUR_VALUE" \
-G --data-urlencode "image=YOUR_VALUE" \
-G --data-urlencode "apikey=YOUR_VALUE" \
-H "Accept: application/json"