Skip to content

Commit

Permalink
feat:增加部分接口
Browse files Browse the repository at this point in the history
  • Loading branch information
overwriter committed Jan 12, 2024
1 parent 6834a08 commit 5c64557
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
70 changes: 70 additions & 0 deletions QCloudMusicApi/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,76 @@ APICPP(banner) {
);
}

// 音乐日历
APICPP(calendar) {
const QVariantMap data {
{ "startTime", query.value("startTime", QDateTime::currentDateTime().toMSecsSinceEpoch()) },
{ "endTime", query.value("endTime", QDateTime::currentDateTime().toMSecsSinceEpoch()) }
};
return request(
POST,
"https://music.163.com/api/mcalendar/detail",
data,
{
{ "crypto", "weapi" },
_PARAM
}
);
}

// 发送验证码
APICPP(captcha_sent) {
const QVariantMap data {
{ "ctcode", query.value("ctcode", "86") },
{ "cellphone", query["cellphone"] }
};
return request(
POST,
"https://music.163.com/api/sms/captcha/sent",
data,
{
{ "crypto", "weapi" },
_PARAM
}
);
}

// 校验验证码
APICPP(captcha_verify) {
const QVariantMap data {
{ "ctcode", query.value("ctcode", "86") },
{ "cellphone", query["phone"] },
{ "captcha", query["captcha"] }
};
return request(
POST,
"https://music.163.com/weapi/sms/captcha/verify",
data,
{
{ "crypto", "weapi" },
_PARAM
}
);
}

// 检测手机号码是否已注册
APICPP(cellphone_existence_check) {
const QVariantMap data {
{ "cellphone", query["phone"] },
{ "countrycode", query["countrycode"] }
};
return request(
POST,
"https://music.163.com/eapi/cellphone/existence/check",
data,
{
{ "crypto", "eapi" },
_PARAM,
{ "url", "/api/cellphone/existence/check" }
}
);
}

// 搜索
APICPP(cloudsearch) {
const QVariantMap data {
Expand Down
12 changes: 12 additions & 0 deletions QCloudMusicApi/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ class QCLOUDMUSICAPI_EXPORT NeteaseCloudMusicApi: public QObject {
// 首页轮播图
APIH(banner)

// 音乐日历
APIH(calendar)

// 发送验证码
APIH(captcha_sent)

// 校验验证码
APIH(captcha_verify)

// 检测手机号码是否已注册
APIH(cellphone_existence_check)

// 搜索
APIH(cloudsearch)

Expand Down

0 comments on commit 5c64557

Please sign in to comment.