接口地址: https://api.66mz8.com/api/rand.music.163.php
返回格式: get/post
请求方式: json/mp3
请求示例: https://api.66mz8.com/api/rand.music.163.php?format=json
请求参数说明:
| 名称 | 必填 | 类型 | 说明 | |
|---|---|---|---|---|
| format | 否 | string | 选择输出格式 [json|mp3] |
返回参数说明:
| 名称 | 类型 | 说明 | |
|---|---|---|---|
| code | string | 返回的状态码 | |
| msg | string | 返回提示信息 |
请求返回示例:
{
"code": 200,
"name": "凉城",
"artists_name": "任然",
"music_url": "http:\/\/music.163.com\/song\/media\/outer\/url?id=442314991.mp3",
"music_pic": "http:\/\/p1.music.126.net\/9RQepityGQUfi5Rbcz7xCQ==\/18747772766555079.jpg"
}
#include <iostream>
#include <curl/curl.h>
#include <json/json.h>
#include <String>
#pragma warning(disable:4996)
using namespace std;
wchar_t *utf_8ToUnicode(const char *u8s)
{
int wcsLen = MultiByteToWideChar(CP_UTF8, NULL, u8s, strlen(u8s), NULL, NULL);
wchar_t *wcString = new wchar_t[wcsLen + 1];
MultiByteToWideChar(CP_UTF8, NULL, u8s, strlen(u8s), wcString, wcsLen);
wcString[wcsLen] = '\0';
return wcString;
}
char *unicodeToAns

最低0.47元/天 解锁文章
8335

被折叠的 条评论
为什么被折叠?



