冷雨API
返回接口列表

ProtoBuffer(pb)发送音乐卡片

ProtoBuffer(pb)分享音乐卡片,传出16进制数据

GET
总调用次数:119 今日调用:0 返回格式:application/json

接口地址

https://lengy.top/API/proto/share_music_ark.php

请求参数

参数 类型 必填 说明
qun int 必填 群号
title string 必填 标题
singer string 必填 歌手
link string 必填 跳转链
img string 必填 图链
audio string 必填 音乐链接
platform string 必填 音乐平台,qq,wy,kg,kw,bd,mg
chat_type int 必填 1为私聊,2为群聊

返回码说明

暂无返回码说明

返回结果

点击「请求」按钮,查看接口返回结果

多语言调用示例

cURL
curl -X GET "https://lengy.top/API/proto/share_music_ark.php?qun=your_qun&title=your_title&singer=your_singer&link=your_link&img=your_img&audio=your_audio&platform=your_platform&chat_type=your_chat_type"
Python
import requests

url = "https://lengy.top/API/proto/share_music_ark.php"
params = {
    'qun': 'your_qun',
    'title': 'your_title',
    'singer': 'your_singer',
    'link': 'your_link',
    'img': 'your_img',
    'audio': 'your_audio',
    'platform': 'your_platform',
    'chat_type': 'your_chat_type'
}
response = requests.get(url, params=params)
print(response.text)
PHP
<?php
$url = "https://lengy.top/API/proto/share_music_ark.php";
$params = [
    'qun' => 'your_qun',
    'title' => 'your_title',
    'singer' => 'your_singer',
    'link' => 'your_link',
    'img' => 'your_img',
    'audio' => 'your_audio',
    'platform' => 'your_platform',
    'chat_type' => 'your_chat_type'
];
$full_url = $url . (strpos($url, '?') === false ? '?' : '&') . http_build_query($params);
$result = file_get_contents($full_url);
echo $result;
?>
JavaScript
// 使用 fetch 发送GET请求
const url = new URL('https://lengy.top/API/proto/share_music_ark.php');
url.searchParams.append('qun', 'your_qun');
url.searchParams.append('title', 'your_title');
url.searchParams.append('singer', 'your_singer');
url.searchParams.append('link', 'your_link');
url.searchParams.append('img', 'your_img');
url.searchParams.append('audio', 'your_audio');
url.searchParams.append('platform', 'your_platform');
url.searchParams.append('chat_type', 'your_chat_type');

fetch(url)
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error('请求失败:', err));
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ApiRequest {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        String url = "https://lengy.top/API/proto/share_music_ark.php";
        
        // 拼接请求参数
        url += "?" + "qun=your_qun&title=your_title&singer=your_singer&link=your_link&img=your_img&audio=your_audio&platform=your_platform&chat_type=your_chat_type";
        
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(url))
                .GET()
                .build();

        client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
                .thenApply(HttpResponse::body)
                .thenAccept(System.out::println)
                .join();
    }
}
Go
package main

import (
	"fmt"
	"net/http"
	"net/url"
	"io/ioutil"
)

func main() {
	baseUrl := "https://lengy.top/API/proto/share_music_ark.php"
	parsedUrl, _ := url.Parse(baseUrl)
	
	q := parsedUrl.Query()
	q.Set("qun", "your_qun");
	q.Set("title", "your_title");
	q.Set("singer", "your_singer");
	q.Set("link", "your_link");
	q.Set("img", "your_img");
	q.Set("audio", "your_audio");
	q.Set("platform", "your_platform");
	q.Set("chat_type", "your_chat_type");
	parsedUrl.RawQuery = q.Encode()
	
	resp, err := http.Get(parsedUrl.String())
	if err != nil {
		fmt.Println("请求失败:", err)
		return
	}
	defer resp.Body.Close()
	
	body, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(body))
}
C#
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        var url = new Uri("https://lengy.top/API/proto/share_music_ark.php");
        
        var queryParams = new Dictionary<string, string>();
            queryParams.Add("qun", "your_qun");
            queryParams.Add("title", "your_title");
            queryParams.Add("singer", "your_singer");
            queryParams.Add("link", "your_link");
            queryParams.Add("img", "your_img");
            queryParams.Add("audio", "your_audio");
            queryParams.Add("platform", "your_platform");
            queryParams.Add("chat_type", "your_chat_type");
            var uriBuilder = new UriBuilder(url);
            uriBuilder.Query = new FormUrlEncodedContent(queryParams).ReadAsStringAsync().Result;
            url = uriBuilder.Uri;
        
        var response = await client.GetAsync(url);
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
Shell
# 使用curl发送GET请求
curl -X GET "https://lengy.top/API/proto/share_music_ark.php?qun=your_qun&title=your_title&singer=your_singer&link=your_link&img=your_img&audio=your_audio&platform=your_platform&chat_type=your_chat_type"
词库
# Secluded/QRspeed/ClousX6
A:$访问 https://lengy.top/API/proto/share_music_ark.php?qun=your_qun&title=your_title&singer=your_singer&link=your_link&img=your_img&audio=your_audio&platform=your_platform&chat_type=your_chat_type$
Kotlin
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request

fun main() {
    val client = OkHttpClient()
    val url = "https://lengy.top/API/proto/share_music_ark.php"
    
    // GET 请求拼接参数
val requestBuilder = Request.Builder().url(url + "?" + "qun=your_qun&title=your_title&singer=your_singer&link=your_link&img=your_img&audio=your_audio&platform=your_platform&chat_type=your_chat_type")
val request = requestBuilder.get().build()
    
    client.newCall(request).execute().use { response ->
        if (!response.isSuccessful) throw RuntimeException("请求失败: ${response.code}")
        println(response.body?.string())
    }
}