{"id":14982634,"url":"https://github.com/s12mmm3/qcloudmusicapi","last_synced_at":"2025-04-07T13:05:59.302Z","repository":{"id":194808269,"uuid":"690377352","full_name":"s12mmm3/QCloudMusicApi","owner":"s12mmm3","description":"Qt C++版 网易云音乐 API","archived":false,"fork":false,"pushed_at":"2024-10-11T11:09:44.000Z","size":729,"stargazers_count":68,"open_issues_count":3,"forks_count":15,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2024-10-12T01:20:54.423Z","etag":null,"topics":["api","apis","cloudmusic","cpp","neteasecloud","qt","qt5","qt6"],"latest_commit_sha":null,"homepage":"https://s12mmm3.github.io/QCloudMusicApi/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s12mmm3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-12T04:44:34.000Z","updated_at":"2024-10-11T11:09:48.000Z","dependencies_parsed_at":"2023-11-24T15:27:09.784Z","dependency_job_id":"ce3820a5-280a-40a1-b70d-32c13931f215","html_url":"https://github.com/s12mmm3/QCloudMusicApi","commit_stats":{"total_commits":383,"total_committers":8,"mean_commits":47.875,"dds":0.720626631853786,"last_synced_commit":"33d1c1d202ab2f84be05d6cfef97e4a42c2103f8"},"previous_names":["s12mmm3/qcloudmusicapi"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s12mmm3%2FQCloudMusicApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s12mmm3%2FQCloudMusicApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s12mmm3%2FQCloudMusicApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s12mmm3%2FQCloudMusicApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s12mmm3","download_url":"https://codeload.github.com/s12mmm3/QCloudMusicApi/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657276,"owners_count":20974344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","apis","cloudmusic","cpp","neteasecloud","qt","qt5","qt6"],"created_at":"2024-09-24T14:05:46.862Z","updated_at":"2025-04-07T13:05:59.286Z","avatar_url":"https://github.com/s12mmm3.png","language":"C++","readme":"# QCloudMusicApi - Qt版 网易云音乐 API\n\n[![GitHub Actions CI Status](https://github.com/s12mmm3/QCloudMusicApi/actions/workflows/windows.yml/badge.svg)](https://github.com/s12mmm3/QCloudMusicApi/actions/workflows/windows.yml)\n[![GitHub Actions CI Status](https://github.com/s12mmm3/QCloudMusicApi/actions/workflows/macos.yml/badge.svg)](https://github.com/s12mmm3/QCloudMusicApi/actions/workflows/macos.yml)\n[![GitHub Actions CI Status](https://github.com/s12mmm3/QCloudMusicApi/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/s12mmm3/QCloudMusicApi/actions/workflows/ubuntu.yml)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fs12mmm3%2FQCloudMusicApi.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fs12mmm3%2FQCloudMusicApi?ref=badge_shield)\n\n![C++ version](https://img.shields.io/badge/C++-11-00599C?logo=++)\n[![Qt version](https://img.shields.io/badge/Qt-5.12+-41CD52?logo=qt)](https://www.qt.io)\n[![Qt version](https://img.shields.io/badge/Qt-6.0+-41CD52?logo=qt)](https://www.qt.io)\n![GitHub license](https://img.shields.io/github/license/s12mmm3/QCloudMusicApi)\n\n## 简介\n\n本项目翻译自Node.js项目[Binaryify/NeteaseCloudMusicApi](https://github.com/Binaryify/NeteaseCloudMusicApi)\n\n更新尽量与原项目同步，实现了大部分接口；支持[跨语言调用](./doc/BINDINGS.md)，支持跨平台编译，支持多种编译器编译\n\n使用方式参考[原项目文档](https://binaryify.github.io/NeteaseCloudMusicApi)，参数与返回结果与原项目完全一致；支持设置Http服务器（需要Qt6.4及以上）\n\n### 样例项目\n\n[s12mmm3/QListenTogether](https://github.com/s12mmm3/QListenTogether) - 网易云 一起听客户端\n\n### 目录\n\n- [需求和依赖](#需求和依赖)\n- [使用说明](#使用说明)\n- [编译方式](#编译方式)\n- [License](#License)\n\n---\n\n## 需求和依赖\n\n- [Qt 5.12+](https://www.qt.io/download-qt-installer)\n\n## 使用说明\n\n可参考文档[API 参考](./doc/API.md)\n\n#### 使用ApiHelper类\n\n该类实现了API的cookie管理；支持Qt反射调用\n\n通过对应方法字符串调用\n```C++\n#include \"apihelper.h\"\n\nApiHelper helper;\nqDebug() \u003c\u003c helper.invoke(\"lyric_new\", { { \"id\", \"1408586353\" } });\n```\n传入Url调用\n```C++\nApiHelper helper;\nqDebug() \u003c\u003c helper.invokeUrl(\"/song/url/v1?id=2058263032, 2057797340\u0026level=exhigh\");\nqDebug() \u003c\u003c helper.invokeUrl(\"http://localhost:3000/activate/init/profile\");\n```\n\n#### 使用NeteaseCloudMusicApi类\n\n若无需保存cookie，可直接使用该类，直接调用类函数；\n支持Qt反射调用，所有方法均注册至Qt元对象系统中\n\n```C++\n#include \"module.h\"\n\nNeteaseCloudMusicApi api;\nqDebug() \u003c\u003c api.lyric_new({ { \"id\", \"1408586353\" } });\n```\n\n### 跨语言调用\n\n动态库提供C接口，开放给Python、Java和C#等支持与C语言交互的语言调用\n```C++\n/**\n * @brief 反射调用API的成员函数。\n * @param memberName 调用成员函数的名称\n * @param value 参数的JSON格式字符串\n * @return 调用结果的JSON格式字符串\n */\nconst char* invoke(char* memberName, char* value);\n```\n\n调用例子参考[跨语言调用](./doc/BINDINGS.md)\n\n### 引用动态库文件\n\n在CMakeLists.txt文件中加上\n```CMake\nset(LIBRARY_DIR \"${PROJECT_SOURCE_DIR}/QCloudMusicApi\")\n# 添加头文件路径\ninclude_directories(${LIBRARY_DIR}/include)\n# 添加库文件路径\nlink_directories(${LIBRARY_DIR}/bin)\n```\n\n### 在项目中引用CMake项目\n\n在CMakeLists.txt文件中加上\n```CMake\nadd_subdirectory(QCloudMusicApi)\nadd_executable(${PROJECT_NAME}\n    ./QCloudMusicApi/QCloudMusicApi/apihelper.h\n  main.cpp\n)\ntarget_compile_definitions(${PROJECT_NAME} PRIVATE QCLOUDMUSICAPI_LIBRARY)\ntarget_link_libraries(${PROJECT_NAME}  QCloudMusicApi)\n```\n引用头文件\n```C++\n#include \"QCloudMusicApi/QCloudMusicApi/apihelper.h\"\n```\n\n## 编译方式\n\n```Shell\ngit clone --recursive https://github.com/s12mmm3/QCloudMusicApi.git\ncd QCloudMusicApi\ncmake -B build\ncmake --build build -j\n```\n\n## License\n\n[The MIT License (MIT)](LICENSE)\n\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fs12mmm3%2FQCloudMusicApi.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fs12mmm3%2FQCloudMusicApi?ref=badge_large)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs12mmm3%2Fqcloudmusicapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs12mmm3%2Fqcloudmusicapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs12mmm3%2Fqcloudmusicapi/lists"}