{"id":15673696,"url":"https://github.com/cssxsh/baidu-client","last_synced_at":"2025-05-07T20:09:36.961Z","repository":{"id":48516040,"uuid":"343050735","full_name":"cssxsh/baidu-client","owner":"cssxsh","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-02T03:31:50.000Z","size":681,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T20:09:28.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssxsh.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":"2021-02-28T07:57:05.000Z","updated_at":"2024-12-10T12:24:21.000Z","dependencies_parsed_at":"2024-10-23T20:43:38.754Z","dependency_job_id":"0d3b8df9-2d69-40f7-871a-b823a8f286d4","html_url":"https://github.com/cssxsh/baidu-client","commit_stats":{"total_commits":194,"total_committers":1,"mean_commits":194.0,"dds":0.0,"last_synced_commit":"936659e7a97f3e649aed605d0c6c9ac73f663780"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fbaidu-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fbaidu-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fbaidu-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fbaidu-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssxsh","download_url":"https://codeload.github.com/cssxsh/baidu-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252949271,"owners_count":21830151,"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":[],"created_at":"2024-10-03T15:41:47.528Z","updated_at":"2025-05-07T20:09:36.935Z","avatar_url":"https://github.com/cssxsh.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Baidu Api Client\n\n\u003e 百度API的Kotlin Jvm SDK\n\n[![Test](https://github.com/cssxsh/baidu-client/actions/workflows/Test.yml/badge.svg)](https://github.com/cssxsh/baidu-client/actions/workflows/Test.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9d86fd8a8c81490b94107f03df1dac5b)](https://www.codacy.com/gh/cssxsh/baidu-client/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=cssxsh/baidu-client\u0026amp;utm_campaign=Badge_Grade)\n\n*   oauth ![baidu-oauth](https://img.shields.io/maven-central/v/xyz.cssxsh.baidu/baidu-oauth)\n*   aip ![baidu-aip](https://img.shields.io/maven-central/v/xyz.cssxsh.baidu/baidu-aip)\n*   netdisk ![baidu-netdisk](https://img.shields.io/maven-central/v/xyz.cssxsh.baidu/baidu-netdisk)\n*   unit ![baidu-netdisk](https://img.shields.io/maven-central/v/xyz.cssxsh.baidu/baidu-unit)\n\n## Baidu User Oauth\n\n部分SDK的前置库  \n有三种[验证方式](https://developer.baidu.com/wiki/index.php?title=docs/oauth/application)\n\n服务端的方式获取 Token, block 输入 认证网页 Url ，返回认证码  \n`suspend fun authorize(block: suspend (Url) -\u003e String)`\n\n移动端的方式获取 Token, block 输入 认证网页 Url ，返回跳转Url  \n`suspend fun implicit(block: suspend (Url) -\u003e Url)`\n\n设备认证的方式获取 Token, block 第一个参数是 直接网页认证的Url，第二个是 二维码认证的图片Url  \n`suspend fun device(block: suspend (Url, Url) -\u003e Unit)`\n\n刷新 Token  \n`suspend fun refresh()`\n\n## Baidu Netdisk\n\n构建客户端的参数需要到 [百度网盘开放中心](https://pan.baidu.com/union/apply) 申请  \n客户端工作目录为`/apps/${app_name}`\n\n已完成的功能\n\n1.  验证登录\n2.  上传文件\n3.  列出文件\n4.  搜索文件\n5.  [秒传链接](https://zhuanlan.zhihu.com/p/356900770) 获取和解析\n\n## Baidu AIP\n\n[AIP文档](https://ai.baidu.com/ai-doc)\n\n目前实现的功能有\n\n*   [AipContentCensor](baidu-aip/src/main/kotlin/xyz/cssxsh/baidu/aip/AipContentCensor.kt) 智能内容审核\n*   [AipTextToSpeech](baidu-aip/src/main/kotlin/xyz/cssxsh/baidu/aip/AipTextToSpeech.kt) 在线语音合成\n*   [AipTranslator](baidu-aip/src/main/kotlin/xyz/cssxsh/baidu/aip/AipTranslator.kt) 机器翻译\n*   [AipNaturalLanguageProcessing](baidu-aip/src/main/kotlin/xyz/cssxsh/baidu/aip/AipNaturalLanguageProcessing.kt) 自然语言分析\n\n## Baidu Unit\n\n[Unit 文档](https://ai.baidu.com/ai-doc/UNIT/Lkipmh0tz)  \n[Unit 控制台](https://ai.baidu.com/unit/v2)\n\n## Gradle引用包\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"xyz.cssxsh.baidu:baidu-netdisk:${version}\")\n    implementation(\"xyz.cssxsh.baidu:baidu-aip:${version}\")\n    implementation(\"xyz.cssxsh.baidu:baidu-unit:${version}\")\n}\n```\n\n注意 本SDK 设置的 `JvmTarget` 为 `JavaVersion.VERSION_11`\n\n## [爱发电](https://afdian.net/@cssxsh)\n\n![afdian](.github/afdian.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fbaidu-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssxsh%2Fbaidu-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fbaidu-client/lists"}