# WanAndroid devops **Repository Path**: indsvr/wan-android-devops ## Basic Information - **Project Name**: WanAndroid devops - **Description**: 玩安卓开发文档 - **Primary Language**: Java - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-22 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 统一返回格式 ### 1) 请求返回结果: ```json { "data": [], "errorCode": 0, "errorMsg": "" } ``` ### 2) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 可为空 | | --------- | :------------: | :-----: | :----: | | data | 返回的具体数据 | List | Y | | errorCode | 错误码 | int | N | | errorMsg | 错误信息 | string | N | ### 3)错误码 1. errorCode = 0 代表执行成功,不建议依赖任何非0的 errorCode. 2. errorCode = -1001 代表登录失效,需要重新登录。 ### 4)测试账户 账户:```android607``` 密码:```android607``` ### 5) 声明 下述返回值类型仅供参考,以最新获取的数据为准! # 首页 # ## 1.首页banner ### 1) 请求地址 >https://www.wanandroid.com/banner/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 首页轮播图请求```Api```,无参数GET请求。 ### 4) 请求参数: ​ 无 ### 5) 请求返回结果: ``` { "data": [ { "desc": "扔物线", "id": 29, "imagePath": "https://wanandroid.com/blogimgs/8a0131ac-05b7-4b6c-a8d0-f438678834ba.png", "isVisible": 1, "order": 0, "title": "声明式 UI?Android 官方怒推的 Jetpack Compose 到底是什么?", "type": 0, "url": "http://i0k.cn/4WyJG" }, ...... ], "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :-----: | | data | 具体返回数据 | List | | desc | 作者 | String | | id | id | long | | imagePath | 轮播图片地址 | string | | isVisible | 是否可见 | int | | order | 排序 | int | | title | 标题 | string | | type | 类型 | int | | url | 点击响应(文章地址) | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | ## 2.置顶文章 ### 1) 请求地址 >https://www.wanandroid.com/article/top/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 首页文章之前的置顶文章获取```Api```. ### 4) 请求参数: * 无 ### 5) 请求返回结果: ``` { "data": [ { "apkLink": "", "audit": 1, "author": "扔物线", "canEdit": false, "chapterId": 249, "chapterName": "干货资源", "collect": false, "courseId": 13, "desc": "", "descMd": "", "envelopePic": "", "fresh": true, "host": "", "id": 12554, "link": "http://i0k.cn/5axC1", "niceDate": "刚刚", "niceShareDate": "2020-03-23 16:36", "origin": "", "prefix": "", "projectLink": "", "publishTime": 1617206400000, "realSuperChapterId": 248, "selfVisible": 0, "shareDate": 1584952597000, "shareUser": "", "superChapterId": 249, "superChapterName": "干货资源", "tags": [], "title": "声明式 UI?Android 官方怒推的 Jetpack Compose 到底是什么?", "type": 1, "userId": -1, "visible": 1, "zan": 0 } ...... ], "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ------------------ | :----------: | :-----: | | data | 具体返回数据 | List | | apkLink | app链接 | string | | audit | 审核结果 | Boolean | | author | 作者 | string | | canEdit | 是否可再编辑 | Boolean | | chapterId | 类别id | int | | chapterName | 类别名称 | string | | collect | 收藏 | Boolean | | courseId | 分类id | int | | desc | 描述 | string | | descMd | | string | | envelopePic | | string | | fresh | 是否为新文章 | Boolean | | host | | string | | id | 文章id | int | | link | 文章地址 | string | | niceDate | 发布时间 | string | | niceShareDate | 具体分享时间 | string | | origin | 排序 | string | | prefix | | string | | projectLink | 工程地址 | string | | publishTime | 发布时间 | string | | realSuperChapterId | | string | | selfVisible | 是否自己可见 | boolen | | shareDate | | string | | shareUser | | string | | superChapterId | | string | | superChapterName | | string | | tags | 分类标签 | string | | title | 标题 | string | | type | 类型 | string | | userId | 用户id | int | | visible | 是否可见 | Boolean | | zan | | string | | name | 标签内容 | string | | url | 标签内容地址 | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | ## 3.首页文章列表 ### 1) 请求地址 >https://www.wanandroid.com/article/list/0/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * **很多 H5 页面会恶意跳转淘宝等,可以在 ```webview``` 的 ```houldOverrideUrlLoading``` 中做一下拦截,非常影响用户体验。** 注意:页码从0开始,拼接在链接上。 其中有两个易混淆的字段: ``` "superChapterId": 153, "superChapterName": "framework", // 一级分类的名称 ``` ```superChapterId```其实不是一级分类id,因为要拼接跳转url,内容实际都挂在二级分类下,所以该id实际上是一级分类的第一个子类目的id,拼接后故可正常跳转。 有两个字段比较容易混淆: ```author``` 与 ```shareUser``` 网站上的文章可能是某位作者author的,也可能是某位分享人```shareUser```分享的。 如果是分享人分享的,```author``` 为 ```null```。 **注意:除了文字标题,链接,其他字段都可能为null,一定要注意布局下发 null 时的显示情况。** ### 4) 请求参数: ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "鸿洋", "canEdit": false, "chapterId": 408, "chapterName": "鸿洋", "collect": false, "courseId": 13, "desc": "", "descMd": "", "envelopePic": "", "fresh": true, "host": "", "id": 17689, "link": "https://mp.weixin.qq.com/s/O4UKMv1MAdAQCU2PzkAl6w", "niceDate": "1天前", "niceShareDate": "1小时前", "origin": "", "prefix": "", "projectLink": "", "publishTime": 1616083200000, "realSuperChapterId": 407, "selfVisible": 0, "shareDate": 1616168682000, "shareUser": "", "superChapterId": 408, "superChapterName": "公众号", "tags": [ { "name": "公众号", "url": "/wxarticle/list/408/1" } ], "title": "再谈子线程更新UI的问题!", "type": 0, "userId": -1, "visible": 1, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 511, "size": 20, "total": 10204 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ------------------ | :----------: | :-----: | | data | 具体返回数据 | List | | apkLink | app链接 | string | | audit | 审核结果 | Boolean | | author | 作者 | string | | canEdit | 是否可再编辑 | Boolean | | chapterId | 类别id | int | | chapterName | 类别名称 | string | | collect | 收藏 | Boolean | | courseId | 分类id | int | | desc | 描述 | string | | descMd | | string | | envelopePic | | string | | fresh | 是否为新文章 | Boolean | | host | | string | | id | 文章id | int | | link | 文章地址 | string | | niceDate | 发布时间 | string | | niceShareDate | 具体分享时间 | string | | origin | 排序 | string | | prefix | | string | | projectLink | 工程地址 | string | | publishTime | 发布时间 | string | | realSuperChapterId | | string | | selfVisible | 是否自己可见 | boolen | | shareDate | | string | | shareUser | | string | | superChapterId | | string | | superChapterName | | string | | tags | 分类标签 | string | | title | 标题 | string | | type | 类型 | string | | userId | 用户id | int | | visible | 是否可见 | Boolean | | zan | | string | | name | 标签内容 | string | | url | 标签内容地址 | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | # 搜索 ## 1.搜索热词 ### 1) 请求地址 >https://www.wanandroid.com//hotkey/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 目前搜索最多的关键词。 ### 4) 请求参数: * 无 ### 5) 请求返回结果: ``` { "data": [ { "id": 6, "link": "", "name": "面试", "order": 1, "visible": 1 }, { "id": 9, "link": "", "name": "Studio3", "order": 1, "visible": 1 }, { "id": 5, "link": "", "name": "动画", "order": 2, "visible": 1 }, { "id": 1, "link": "", "name": "自定义View", "order": 3, "visible": 1 }, ...... ], "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 返回的具体数据 | List | | id | id | int | | link | 地址(网址) | string | | name | 名称 | string | | order | 排序 | string | | visible | 是否可见 | Boolean | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ## 2.搜索文章 ### 1) 请求地址 >https://www.wanandroid.com/article/query/0/json ### 2) 调用方式:HTTP post ### 3) 接口描述: * 在全站搜索拥有关键字的文章。 ### 4) 请求参数: | 字段名称 | 字段说明 | 类型 | 必填 | | -------- | :--------: | :----: | :--: | | k | 搜索关键字 | string | Y | ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "扔物线", "canEdit": false, "chapterId": 249, "chapterName": "干货资源", "collect": false, "courseId": 13, "desc": "", "descMd": "", "envelopePic": "", "fresh": true, "host": "", "id": 12554, "link": "http://i0k.cn/5axC1", "niceDate": "刚刚", "niceShareDate": "2020-03-23 16:36", "origin": "", "prefix": "", "projectLink": "", "publishTime": 1617206400000, "realSuperChapterId": 248, "selfVisible": 0, "shareDate": 1584952597000, "shareUser": "", "superChapterId": 249, "superChapterName": "干货资源", "tags": [], "title": "声明式 UI?Android 官方怒推的 Jetpack Compose 到底是什么?", "type": 1, "userId": -1, "visible": 1, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 268, "size": 20, "total": 5352 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ------------------ | :------: | :----: | | data | 返回的具体数据 | List | | curPage | 页码 | string | | datas | 分页数据 | string | | apkLink | app链接 | string | | author | 作者 | string | | canEdit | 是否可再编辑 | Boolean | | chapterId | 类别id | int | | chapterName | 类别名称 | string | | collect | 收藏 | Boolean | | courseId | 分类id | int | | desc | 描述 | string | | descMd | | string | | envelopePic | | string | | fresh | 是否为新文章 | string | | host | | string | | id | 文章id | string | | link | 文章地址 | string | | niceDate | 发布时间 | string | | niceShareDate | 具体发布时间 | string | | origin | 排序 | string | | prefix | | string | | projectLink | 工程地址 | string | | publishTime | 发布时间 | string | | realSuperChapterId | | string | | selfVisible | 是否自己可见 | string | | shareDate | | string | | shareUser | | string | | superChapterId | | string | | superChapterName | | string | | tags | 分类标签 | string | | title | 标题 | string | | type | 类型 | string | | userId | 用户id | int | | visible | 是否可见 | Boolean | | zan | | string | | name | 标签内容 | string | | url | 标签内容地址 | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | ## 3.按照作者昵称搜索文章 ### 1) 请求地址 >https://wanandroid.com/article/list/0/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 页码:拼接在链接上,从0开始。 * author:作者昵称,不支持模糊匹配。 ### 4) 请求参数: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | -------- | :------: | :----: | :--: | ---: | | author | | string | Y | - | ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "jzmanu", "canEdit": false, "chapterId": 402, "chapterName": "跨平台应用", "collect": false, "courseId": 13, "desc": "Android+Flutter混合开发的玩安卓开源客户端,使用了主流的开发技术,很好的练手项目,持续更新。", "descMd": "", "envelopePic": "https://www.wanandroid.com/blogimgs/a2cc8097-b609-4b63-9501-37b726b2794e.png", "fresh": false, "host": "", "id": 17697, "link": "https://www.wanandroid.com/blog/show/2966", "niceDate": "1天前", "niceShareDate": "1天前", "origin": "", "prefix": "", "projectLink": "https://github.com/jzmanu/JzmanWanAndroid", "publishTime": 1616234296000, "realSuperChapterId": 293, "selfVisible": 0, "shareDate": 1616234296000, "shareUser": "", "superChapterId": 294, "superChapterName": "开源项目主Tab", "tags": [ { "name": "项目", "url": "/project/list/1?cid=402" } ], "title": "Android+Flutter混合开发的玩安卓开源客户端", "type": 0, "userId": -1, "visible": 1, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 511, "size": 20, "total": 10206 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ------------------ | :------: | :----: | | data | 返回的具体数据 | List | | curPage | 页码 | string | | datas | 分页数据 | string | | apkLink | app链接 | string | | author | 作者 | string | | canEdit | 是否可再编辑 | Boolean | | chapterId | 类别id | int | | chapterName | 类别名称 | string | | collect | 收藏 | Boolean | | courseId | 分类id | int | | desc | 描述 | string | | descMd | | string | | envelopePic | | string | | fresh | 是否为新文章 | string | | host | | string | | id | 文章id | string | | link | 文章地址 | string | | niceDate | 发布时间 | string | | niceShareDate | 具体发布时间 | string | | origin | | string | | prefix | | string | | projectLink | 工程地址 | string | | publishTime | 发布时间 | string | | realSuperChapterId | | string | | selfVisible | 是否自己可见 | string | | shareDate | | string | | shareUser | | string | | superChapterId | | string | | superChapterName | | string | | tags | 分类标签 | string | | title | 标题 | string | | type | 类型 | string | | userId | 用户id | int | | visible | 是否可见 | Boolean | | zan | | string | | name | 标签内容 | string | | url | 标签内容地址 | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | # 问答 ## 1.问答 ### 1) 请求地址 >https://wanandroid.com/wenda/list/1/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 接口描述详情 ### 4) 请求参数: * pageId,拼接在链接上,例如上面的1 ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "xiaoyang", "canEdit": false, "chapterId": 440, "chapterName": "官方", "collect": false, "courseId": 13, "desc": "

记得mipmap刚出来的时候,出现过很多言论,XXX类型图片放mipmap更好。

\r\n

如今的观念基本停留在,仅将app icon放置到mipmap,其他的图片都放到drawable。

\r\n

那么我们想想:

\r\n
    \r\n
  1. google 为啥要搞个mipmap,或者mipmap有什么特殊的能力?
  2. \r\n
  3. 从源码上能做出相关分析吗?
  4. \r\n
", "descMd": "", "envelopePic": "", "fresh": true, "host": "", "id": 17666, "link": "https://wanandroid.com/wenda/show/17666", "niceDate": "1天前", "niceShareDate": "2天前", "origin": "", "prefix": "", "projectLink": "", "publishTime": 1616080780000, "realSuperChapterId": 439, "selfVisible": 0, "shareDate": 1615986729000, "shareUser": "", "superChapterId": 440, "superChapterName": "问答", "tags": [ { "name": "本站发布", "url": "/article/list/0?cid=440" }, { "name": "问答", "url": "/wenda" } ], "title": "每日一问 | mipmap vs drawable,傻傻分不清楚?", "type": 1, "userId": 2, "visible": 1, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 6, "size": 22, "total": 131 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ------------------ | :------: | :----: | :--: | ---: | | data | 返回的具体数据 | List | Y || | curPage | 页码 | string | Y | - | | datas | 分页数据 | string | Y | - | | apkLink | app链接 | string | Y | - | | author | 作者 | string ||| | canEdit | 是否可再编辑 | Boolean ||| | chapterId | 类别id | int ||| | chapterName | 类别名称 | string ||| | collect | 收藏 | Boolean ||| | courseId | 分类id | int ||| | desc | 描述 | string ||| | descMd | | string ||| | envelopePic | | string ||| | fresh | | string | Y | - | | host | | string | Y | - | | id | 文章id | string | Y | - | | link | 链接地址 | string | Y | - | | niceDate | 发布时间 | string | Y | - | | niceShareDate | | string | Y | - | | origin | | string | Y | - | | prefix | | string | Y | - | | projectLink | 工程链接 | string | Y | - | | publishTime | 发布时间 | string | Y | - | | realSuperChapterId | | string | Y | - | | selfVisible | 是否自己可见 | string | Y | - | | shareDate | 分享时间 | string | Y | - | | shareUser | 分享用户 | string | Y | - | | superChapterId | 父分类id | string | Y | - | | superChapterName | 父分类名称 | string | Y | - | | tags | 分类标签 | string | Y | - | | name | 标签内容 | string | Y | - | | url | 标签内容地址 | string | Y | - | | title | 标题 | string | Y | - | | type | 类型 | Boolean| Y | - | | userId | 用户id | int | Y | - | | visible | 是否可见 | Boolean| Y | - | | zan | | string | Y | - | | offset | 偏移量 | int | Y | - | | over | 列表结束 | Boolean| Y | - | | pageCount | 总页数 | int| Y | - | | size | 数量 | int| Y | - | | total | | string | Y | - | | errorCode | 错误码 | int | N || | errorMsg | 错误信息 | string | N || # 体系与导航 # ## 1.体系 ## 1.1 体系数据 ### 1) 请求地址 >https://www.wanandroid.com/tree/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 主要标识的网站内容的体系结构,二级目录。部分数据参考: ### 4) 请求参数: ### 5) 请求返回结果: ``` { "data": [ { "children": [ { "children": [], "courseId": 13, "id": 60, // id会在查看该目录下所有文章时有用 "name": "Android Studio相关", // 子名称 "order": 1000, "parentChapterId": 150, "visible": 1 }, ... ], "courseId": 13, "id": 150, "name": "开发环境", // 一级的名称 "order": 1, "parentChapterId": 0, "visible": 1 } ], "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ----------------- | :------------: | :-----: | :--: | ---: | | data | 返回的具体数据 | List | Y | - | | children | 数据分页 | List | Y | - | | courseId | 体系id | int | Y | - | | id | 文章id | int | Y | - | | name | 文章名称 | string | Y | - | | order | 排序 | int | Y | - | | parentChapterId | 父分类id | int | Y | - | | userControlSetTop | | string | Y | - | | visible | 可见性 | Boolean | Y | - | | errorCode | 错误代码 | int | Y | - | | errorMsg | 错误信息 | string | Y | - | ## 1.2 知识体系下的文章 ### 1) 请求地址 >https://www.wanandroid.com/article/list/0/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * cid 分类的id,上述二级目录的id * 页码:拼接在链接上,从0开始。 ### 4) 请求参数: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | -------- | :------: | :----: | :--: | ---: | | cid | 分类的id | string | Y | - | ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "jzmanu", "canEdit": false, "chapterId": 402, "chapterName": "跨平台应用", "collect": false, "courseId": 13, "desc": "Android+Flutter混合开发的玩安卓开源客户端,使用了主流的开发技术,很好的练手项目,持续更新。", "descMd": "", "envelopePic": "https://www.wanandroid.com/blogimgs/a2cc8097-b609-4b63-9501-37b726b2794e.png", "fresh": false, "host": "", "id": 17697, "link": "https://www.wanandroid.com/blog/show/2966", "niceDate": "1天前", "niceShareDate": "1天前", "origin": "", "prefix": "", "projectLink": "https://github.com/jzmanu/JzmanWanAndroid", "publishTime": 1616234296000, "realSuperChapterId": 293, "selfVisible": 0, "shareDate": 1616234296000, "shareUser": "", "superChapterId": 294, "superChapterName": "开源项目主Tab", "tags": [ { "name": "项目", "url": "/project/list/1?cid=402" } ], "title": "Android+Flutter混合开发的玩安卓开源客户端", "type": 0, "userId": -1, "visible": 1, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 511, "size": 20, "total": 10206 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ------------------ | :------: | :----: | :--: | ---: | | data | 返回的具体数据 | List | Y || | curPage | 页码 | string | Y | - | | datas | 分页数据 | string | Y | - | | apkLink | app链接 | string | Y | - | | author | 作者 | string ||| | canEdit | 是否可再编辑 | Boolean ||| | chapterId | 类别id | int ||| | chapterName | 类别名称 | string ||| | collect | 收藏 | Boolean ||| | courseId | 分类id | int ||| | desc | 描述 | string ||| | descMd | | string ||| | envelopePic | | string ||| | fresh | | string | Y | - | | host | | string | Y | - | | id | id | string | Y | - | | link | 链接地址 | string | Y | - | | niceDate | 时间 | string | Y | - | | niceShareDate | 分享时间 | string | Y | - | | origin | | string | Y | - | | prefix | | string | Y | - | | projectLink | 工程链接 | string | Y | - | | publishTime | 发布时间 | long | Y | - | | realSuperChapterId | | string | Y | - | | selfVisible | 自己可见 | string | Y | - | | shareDate | 分享时间 | string | Y | - | | shareUser | 分享用户 | string | Y | - | | superChapterId | 父分类id | string | Y | - | | superChapterName | 父分类名称 | string | Y | - | | tags | 分类标签 | string | Y | - | | name | 标签内容 | string | Y | - | | url | 标签内容地址 | string | Y | - | | title | 标题 | string | Y | - | | type | 类型 | Boolean| Y | - | | userId | 用户id | int | Y | - | | visible | 是否可见 | Boolean| Y | - | | zan | | string | Y | - | | offset | 偏移量 | int | Y | - | | over | 列表结束 | Boolean| Y | - | | pageCount | 总页数 | int| Y | - | | size | 数量 | int| Y | - | | total | | string | Y | - | | errorCode | 错误码 | int | N || | errorMsg | 错误信息 | string | N || ## 2.导航 ## 2.1 导航数据 ### 1) 请求地址 >https://www.wanandroid.com/navi/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 接口描述详情 ### 4) 请求参数: ### 5) 请求返回结果: ``` { "data": [ { "articles": [ { "apkLink": "", "audit": 1, "author": "小编", "canEdit": false, "chapterId": 272, "chapterName": "常用网站", "collect": false, "courseId": 13, "desc": "", "descMd": "", "envelopePic": "", "fresh": false, "host": "", "id": 1848, "link": "https://developers.google.cn/", "niceDate": "2018-01-07 18:59", "niceShareDate": "未知时间", "origin": "", "prefix": "", "projectLink": "", "publishTime": 1515322795000, "realSuperChapterId": 0, "selfVisible": 0, "shareDate": null, "shareUser": "", "superChapterId": 0, "superChapterName": "", "tags": [], "title": "Google开发者", "type": 0, "userId": -1, "visible": 0, "zan": 0 }, ...... ], "cid": 272, "name": "常用网站" }, ...... ], "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ------------------ | :------: | :----: | | data | 返回的具体数据 | List | | articles | 文章列表 | List | | apkLink | app链接 | string | | author | 作者 | string | | canEdit | 是否可再编辑 | Boolean | | chapterId | 类别id | int | | chapterName | 类别名称 | string | | collect | 收藏 | Boolean | | courseId | 分类id | int | | desc | 描述 | string | | descMd | | string | | envelopePic | | string | | fresh | | string | | host | | string | | id | id | string | | link | 链接地址 | string | | niceDate | 分享时间 | string | | niceShareDate | 分享时间 | string | | origin | | string | | prefix | | string | | projectLink | 工程链接 | string | | publishTime | 共享时间 | long | | realSuperChapterId | | string | | selfVisible | 自己可见 | string | | shareDate | 分享时间 | string | | shareUser | 分享用户 | string | | superChapterId | 父分类id | string | | superChapterName | 父分类名称 | string | | tags | 分类标签 | string | | title | 标题 | string | | type | 类型 | Boolean| | userId | 用户id | int | | visible | 是否可见 | Boolean| | zan | | string | | cid | 分类的id | string | | name | 标签内容 | string | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | # 项目 ## 1.项目分类 ### 1) 请求地址 >https://www.wanandroid.com/project/tree/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 项目为包含一个分类,该接口返回整个分类。 ### 4) 请求参数: ### 5) 请求返回结果: ``` { "data": [ { "children": [], "courseId": 13, "id": 294, // 该id在获取该分类下项目时需要用到 "name": "完整项目", // 该分类名称 "order": 145000, "parentChapterId": 293, "visible": 0 }, ...... ], "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ----------------- | :------------: | :-----: | :--: | ---: | | data | 返回的具体数据 | List | Y | - | | children | 分页数据 | List | Y | - | | courseId | 分类编号 | int | Y | - | | id | id | int | Y | - | | name | 名称 | string | Y | - | | order | | string | Y | - | | parentChapterId | 父分类id | string | Y | - | | userControlSetTop | | string | Y | - | | visible | 可见性 | Boolean | Y | - | | errorCode | 错误代码 | int | Y | - | | errorMsg | 错误信息 | string | Y | - | ## 2.项目列表数据 ### 1) 请求地址 >https://www.wanandroid.com/project/list/1/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * ```cid``` 分类的id,上面项目分类接口 * 页码:拼接在链接中,从1开始。 ### 4) 请求参数: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | -------- | :------: | :----: | :--: | ---: | | cid | 分类id | string | Y | - | | page | 页码 | int | Y | - | ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "leavesC", "canEdit": false, "chapterId": 294, "chapterName": "完整项目", "collect": false, "courseId": 13, "desc": "Basic Flutter apps, for flutter devs. 一个帮助开发者加深了解 Flutter 的项目,提供了 N 多个常用 Widget 和自定义 Widget 的使用及实现方法,涵盖了系统 Widget 、布局容器、动画、高阶功能、自定义 Widget 等内容,正在密集更新中……", "descMd": "", "envelopePic": "https://www.wanandroid.com/resources/image/pc/default_project_img.jpg", "fresh": false, "host": "", "id": 17653, "link": "https://www.wanandroid.com/blog/show/2961", "niceDate": "2021-03-16 23:58", "niceShareDate": "2021-03-16 23:56", "origin": "", "prefix": "", "projectLink": "https://github.com/leavesC/flutter_do", "publishTime": 1615910313000, "realSuperChapterId": 293, "selfVisible": 0, "shareDate": 1615910217000, "shareUser": "", "superChapterId": 294, "superChapterName": "开源项目主Tab", "tags": [ { "name": "项目", "url": "/project/list/1?cid=294" } ], "title": "一个帮助开发者加深了解 Flutter 的项目", "type": 0, "userId": -1, "visible": 0, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 17, "size": 15, "total": 252 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ------------------ | :------: | :----: | :--: | ---: | | data | 返回的具体数据 | List | Y || | curPage | 分页 | string | Y | - | | datas | 数据分页 | string | Y | - | | apkLink | app链接 | string | Y | - | | author | 作者 | string ||| | canEdit | 是否可再编辑 | Boolean ||| | chapterId | 类别id | int ||| | chapterName | 类别名称 | string ||| | collect | 收藏 | Boolean ||| | courseId | 分类id | int ||| | desc | 描述 | string ||| | descMd | | string ||| | envelopePic | | string ||| | fresh | | string | Y | - | | host | | string | Y | - | | id | id | string | Y | - | | link | 链接地址 | string | Y | - | | niceDate | | string | Y | - | | niceShareDate | | string | Y | - | | origin | | string | Y | - | | prefix | | string | Y | - | | projectLink | 工程链接 | string | Y | - | | publishTime | 分享时间 | string | Y | - | | realSuperChapterId | 真实父分类id | string | Y | - | | selfVisible | 是否自己可见 | string | Y | - | | shareDate | 分享时间 | string | Y | - | | shareUser | 分享用户 | string | Y | - | | superChapterId | 父分类id | string | Y | - | | superChapterName | 父分类名称 | string | Y | - | | tags | 分类标签 | string | Y | - | | name | 标签内容 | string | Y | - | | url | 标签内容地址 | string | Y | - | | title | 标题 | string | Y | - | | type | 类型 | Boolean| Y | - | | userId | 用户id | int | Y | - | | visible | 是否可见 | Boolean| Y | - | | zan | | string | Y | - | | offset | 偏移量 | int | Y | - | | over | 列表结束 | Boolean| Y | - | | pageCount | 总页数 | int| Y | - | | size | 数量 | int| Y | - | | total | | string | Y | - | | errorCode | 错误码 | int | N || | errorMsg | 错误信息 | string | N || # 登录与注册 ## 1.登录 ### 1) 请求地址 >https://www.wanandroid.com/user/login ### 2) 调用方式:HTTP post ### 3) 接口描述: * 登录后会在cookie中返回账号密码,只要在客户端做cookie持久化存储即可自动登录验证。 ### 4) 请求参数: #### POST参数: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | -------- | :------: | :----: | :--: | ---: | | password | 密码 | string | Y | - | | username | 用户名 | string | Y | - | ### 5) 请求返回结果: ``` { "data": { "admin": false, "chapterTops": [], "coinCount": 0, "collectIds": [], "email": "", "icon": "", "id": 91254, "nickname": "android607", "password": "", "publicName": "android607", "token": "", "type": 0, "username": "android607" }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ----------- | :----------: | :-----: | | data | 具体返回数据 | object | | admin | 管理员 | Boolean | | chapterTops | | string | | coinCount | 总积分 | int | | collectIds | | string | | email | 邮箱 | string | | icon | 头像 | string | | id | id | int | | nickname | 昵称 | string | | password | 密码 | string | | publicName | 公开名 | string | | token | | string | | type | 类型 | int | | username | 用户名 | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | ## 2.注册 ### 1) 请求地址 >https://www.wanandroid.com/user/register ### 2) 调用方式:HTTP post ### 3) 接口描述: * 接口描述详情 ### 4) 请求参数: #### POST参数: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ---------- | :------: | :----: | :--: | ---: | | password | 密码 | string | Y | - | | username | 用户名 | string | Y | - | | repassword | 重复密码 | string | Y | - | ### 5) 请求返回结果: ``` { "data": { "admin": false, "chapterTops": [], "coinCount": 0, "collectIds": [], "email": "", "icon": "", "id": 91416, "nickname": "android609", "password": "", "publicName": "android609", "token": "", "type": 0, "username": "android609" }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ----------- | :----------: | :-----: | | data | 具体返回数据 | object | | admin | 管理员 | Boolean | | chapterTops | | string | | coinCount | 总积分 | int | | collectIds | | string | | email | 邮箱 | string | | icon | 头像 | string | | id | id | int | | nickname | 昵称 | string | | password | 密码 | string | | publicName | 公开名 | string | | token | | string | | type | 类型 | int | | username | 用户名 | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | ## 3.退出 ### 1) 请求地址 >https://www.wanandroid.com/user/logout/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 访问了 logout 后,服务端会让客户端清除 Cookie(即cookie max-Age=0),如果客户端 Cookie 实现合理,可以实现自动清理,如果本地做了用户账号密码和保存,及时清理。 ### 4) 请求参数: ### 5) 请求返回结果: ``` { "data": null, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 空 | null | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | # 积分 ## 1.积分排行榜接口 ### 1) 请求地址 >https://www.wanandroid.com/coin/rank/1/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 平台所有注册用户的积分排行。 ### 4) 请求参数: * 页码:拼接在链接上,从1开始。 ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "coinCount": 36854, "level": 369, "nickname": "", "rank": "1", "userId": 20382, "username": "g**eii" }, ...... ], "offset": 0, "over": false, "pageCount": 2191, "size": 30, "total": 65725 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 返回的具体数据 | List | | curPag | 当前页码 | int | | datas | 页面具体内容 | string | | coinCount | 当前积分 | int | | level | 等级 | int | | nickname | 昵称 | string | | rank | 排行 | string | | userId | 用户id | int | | username | 用户名 | string | | offset | 偏移量 | int | | over | 结束 | Boolean | | pageCount | 总页数 | int | | size | 一页容量 | int | | total | 总记录条数 | int | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ## 2.个人积分 ### 1) 请求地址 >https://www.wanandroid.com/lg/coin/userinfo/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 获取个人积分,需要登录后访问 ### 4) 请求参数: * 无 ### 5) 请求返回结果: ``` { "data": { "coinCount": 33, "level": 1, "nickname": "", "rank": "13617", "userId": 91254, "username": "a**roid607" }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 返回值具体类型 | List | | coinCount | 总积分 | int | | level | 等级 | int | | nickname | 昵称 | string | | rank | 当前排名 | string | | userId | 用户id | int | | username | 用户名 | string | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ## 3.个人积分获取列表 ### 1) 请求地址 >https://www.wanandroid.com//lg/coin/list/1/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 获取个人积分获取列表,需要登录后访问 ### 4) 请求参数: * 页码:拼接在链接上,从1开始。 ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "coinCount": 12, "date": 1616381929000, "desc": "2021-03-22 10:58:49 签到 , 积分:10 + 2", "id": 396166, "reason": "签到", "type": 1, "userId": 91254, "userName": "android607" }, ...... ], "offset": 0, "over": true, "pageCount": 1, "size": 20, "total": 3 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 返回值具体类型 | List | | curPage | 当前页码 | int | | datas | 当前页面具体信息 | string | | coinCount | 当前积分 | int | | date | 时间戳 | long | | desc | 积分获取记录 | string | | id | id | int | | reason | 积分来源 | string | | type | 积分来源编号 | int | | userId | 用户id | int | | userName | 用户名 | string | | offset | 偏移量 | int | | over | 结束 | Boolean | | pageCount | 总页码 | int | | size | 一页容量 | int | | total | 总记录条数 | int | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | # 收藏 ## 1.收藏文章列表 ### 1) 请求地址 >https://www.wanandroid.com/lg/collect/list/0/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 个人收藏,需登录后获取。 ### 4) 请求参数: * 页码:拼接在链接中,从0开始。 ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "author": "扔物线", "chapterId": 249, "chapterName": "干货资源", "courseId": 13, "desc": "", "envelopePic": "", "id": 178867, "link": "http://i0k.cn/5axC1", "niceDate": "3分钟前", "origin": "", "originId": 12554, "publishTime": 1616411647000, "title": "声明式 UI?Android 官方怒推的 Jetpack Compose 到底是什么?", "userId": 91254, "visible": 0, "zan": 0 } ], "offset": 0, "over": true, "pageCount": 1, "size": 20, "total": 1 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ----------- | :------: | :----: | | data | 具体返回数据 | List | | curPage | 页码 | int | | datas | 分页数据 | List | | author | 作者 | string | | canEdit | 是否可再编辑 | Boolean | | chapterId | 类别id | int | | chapterName | 类别名称 | string | | collect | 收藏 | Boolean | | courseId | 分类id | int | | desc | 描述 | string | | descMd | | string | | envelopePic | | string | | id | id | int | | link | 地址链接 | string | | niceDate | | string | | origin | 来源 | string | | originId | 来源id | int | | publishTime | 共享时间 | long | | title | 标题 | string | | userId | 用户id | int | | visible | 可见性 | Boolean | | zan | | string | | offset | 偏移 | string | | over | 是否结束 | Boolean | | pageCount | 页码总量 | int | | size | 条目数量 | int | | total | | string | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ## 2.收藏站内文章 ### 1) 请求地址 >https://www.wanandroid.com/lg/collect/1165/json ### 2) 调用方式:HTTP post ### 3) 接口描述: * 注意链接中的数字,为需要收藏的id. ### 4) 请求参数: * 方法:POST * 参数: 文章id,拼接在链接中 ### 5) 请求返回结果: ``` { "data": null, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 无 | null | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ## 3.收藏站外文章 ### 1) 请求地址 >https://www.wanandroid.com/lg/collect/add/json ### 2) 调用方式:HTTP post ### 3) 接口描述: * 收藏本站未收藏的文章,可收藏任何网站文章。 ### 4) 请求参数: #### POST参数: | 字段名称 | 字段说明 | 类型 | | -------- | :------: | :----: | | title | 标题 | string | | author | 作者 | string | | link | 链接地址 | string | ### 5) 请求返回结果: ``` { "data": { "author": "ewq", "chapterId": 0, "chapterName": "", "courseId": 13, "desc": "", "envelopePic": "", "id": 178870, "link": "http://baidu.com", "niceDate": "刚刚", "origin": "", "originId": -1, "publishTime": 1616412314256, "title": "qwe", "userId": 91254, "visible": 0, "zan": 0 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ----------- | :----------: | :-----: | | data | 具体返回数据 | List | | author | 作者 | string | | chapterId | 章节标识 | int | | chapterName | 章节名称 | string | | courseId | 分类编号 | int | | desc | 排序 | string | | envelopePic | | string | | id | id | int | | link | 链接地址 | string | | niceDate | 发布时间 | string | | origin | 来源 | string | | originId | 来源id | int | | publishTime | 共享时间 | long | | title | 标题 | string | | userId | 用户id | int | | visible | 是否可见 | Boolean | | zan | | string | | errorCode | 错误代码 | int | | errorMsg | 错误信息 | string | ## 4.取消收藏 取消收藏一共有两个地方可以触发: ​ 1)文章列表 ​ 2)我的收藏页面(该页面包含自己录入的内容) ### 4.1 文章列表 #### 1) 请求地址 >https://www.wanandroid.com/lg/uncollect_originId/178870/json #### 2) 调用方式:HTTP post #### 3) 接口描述: * id传入的是列表中文章的id。 #### 4) 请求参数: * id:拼接在链接上 #### 5) 请求返回结果: ``` { "data": null, "errorCode": 0, "errorMsg": "" } ``` #### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 空 | null | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ### 4.2 我的收藏页面 #### 1) 请求地址 >https://www.wanandroid.com/lg/uncollect/178870/json #### 2) 调用方式:HTTP post #### 3) 接口描述: * originId 代表的是你收藏之前的那篇文章本身的id; 但是收藏支持主动添加,这种情况下,没有originId则为-1 #### 4) 请求参数: * id:拼接在链接上 * originId:列表页下发,无则为-1 #### 5) 请求返回结果: ``` { "data": null, "errorCode": 0, "errorMsg": "" } ``` # 广场 ## 1.广场列表数据 ### 1) 请求地址 >https://wanandroid.com/user_article/list/0/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 可能出现返回列表数据<每页数据,因为有自见的文章被过滤掉了。 ### 4) 请求参数: * 页码:拼接在链接上,从0开始。 ### 5) 请求返回结果: ``` { "data": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "", "canEdit": false, "chapterId": 494, "chapterName": "广场", "collect": false, "courseId": 13, "desc": "", "descMd": "", "envelopePic": "", "fresh": true, "host": "", "id": 17702, "link": "https://juejin.cn/post/6941585326675034143", "niceDate": "11小时前", "niceShareDate": "11小时前", "origin": "", "prefix": "", "projectLink": "", "publishTime": 1616373522000, "realSuperChapterId": 493, "selfVisible": 0, "shareDate": 1616373522000, "shareUser": "goweii", "superChapterId": 494, "superChapterName": "广场Tab", "tags": [], "title": "Retrofit枯燥无趣的源码分析", "type": 0, "userId": 20382, "visible": 0, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 139, "size": 20, "total": 2780 }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | ------------------ | :------: | :----: | | data | 返回的具体数据 | List | | curPage | 当前页码 | int | | datas | 文章列表 | string | | apkLink | app链接 | string | | audit | 审核结果 | int | | author | 作者 | string | | canEdit | 是否可再编辑 | Boolean | | chapterId | 类别id | int | | chapterName | 类别名称 | string | | collect | 收藏 | string | | courseId | 分类id | int | | desc | 作者 | string | | descMd | | string | | envelopePic | | string | | fresh | 是否为新文章 | Boolean | | host | | string | | id | 文章id | int | | link | 文章地址 | string | | niceDate | 发布时间 | string | | niceShareDate | 具体分享时间 | string | | origin | | string | | prefix | | string | | projectLink | 工程地址 | string | | publishTime | 发表时间 | long | | realSuperChapterId | 真实父分类id | int | | selfVisible | 是否可见 | int | | shareDate | 分享时间 | long | | shareUser | 分享人 | string | | superChapterId | 父分类id | int | | superChapterName | 父分类名称 | string | | tags | 分类标签 | string | | title | 标题 | string | | type | 类型 | Boolean| | userId | 用户id | int | | visible | 是否可见 | Boolean| | zan | | string | | offset | 偏移量 | int | | over | 列表结束 | Boolean| | pageCount | 总页数 | int| | size | 数量 | int| | total | 总记录条数 | string | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ## 2.分享人对应列表数据 ### 1) 请求地址 >https://www.wanandroid.com/user/2/share_articles/1/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 这个展示的文章数据都是审核通过的,一般是点击分享人然后展示的列表。 ### 4) 请求参数: * 用户id: 拼接在url上 * 页码拼接在url上从1开始 ### 5) 请求返回结果: ``` { "data": { "coinInfo": { "coinCount": 27016, "level": 271, "nickname": "鸿洋", "rank": "3", "userId": 2, "username": "x**oyang" }, "shareArticles": { "curPage": 1, "datas": [ { "apkLink": "", "audit": 1, "author": "", "canEdit": false, "chapterId": 494, "chapterName": "广场", "collect": false, "courseId": 13, "desc": "", "descMd": "", "envelopePic": "", "fresh": false, "host": "", "id": 17695, "link": "https://www.jianshu.com/p/273e99e3d1b7", "niceDate": "2天前", "niceShareDate": "2天前", "origin": "", "prefix": "", "projectLink": "", "publishTime": 1616230032000, "realSuperChapterId": 493, "selfVisible": 0, "shareDate": 1616230032000, "shareUser": "鸿洋", "superChapterId": 494, "superChapterName": "广场Tab", "tags": [], "title": "ImageView scaleType 各种不同效果解析 ", "type": 0, "userId": 2, "visible": 0, "zan": 0 }, ...... ], "offset": 0, "over": false, "pageCount": 54, "size": 20, "total": 1061 } }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ------------------ | :--------------------: | :-----: | :--: | ---: | | data | 返回的具体数据 | List | Y | - | | coinInfo | 文章作者用户积分信息 | string | Y | - | | coinCount | 文章作者积分总数 | int | Y | - | | level | 文章作者等级 | int | Y | - | | nickname | 文章作者昵称 | string | Y | - | | rank | 文章作者排名 | string | Y | - | | userId | 文章作者id | int | Y | - | | username | 文章作者用户名 | string | Y | - | | shareArticles | 该用户分享文章分页信息 | string | Y | - | | curPage | 当前页码 | int | Y | - | | datas | 文章列表 | string | Y | - | | apkLink | app链接 | string | Y | - | | audit | 审核结果 | int | Y | - | | author | 作者 | string | Y | - | | canEdit | 是否可再编辑 | boolean | Y | - | | chapterId | 类别id | int | Y | - | | chapterName | 类别名称 | string | Y | - | | collect | 收藏 | string | Y | - | | courseId | 分类id | int | Y | - | | desc | 作者 | string | Y | - | | descMd | | string | Y | - | | envelopePic | | string | Y | - | | fresh | 是否为新文章 | boolean | Y | - | | host | | string | Y | - | | id | 文章id | int | Y | - | | link | 文章地址 | string | Y | - | | niceDate | 发布时间 | string | Y | - | | niceShareDate | 具体分享时间 | string | Y | - | | origin | | string | Y | - | | prefix | | string | Y | - | | projectLink | 工程地址 | string | Y | - | | publishTime | 发表时间 | long | Y | - | | realSuperChapterId | 真实父分类id | int | Y | - | | selfVisible | 是否可见 | int | Y | - | | shareDate | 共享时间 | long | Y | - | | shareUser | 共享人 | string | Y | - | | superChapterId | 父分类id | int | Y | - | | superChapterName | 父分类名称 | string | Y | - | | tags | 分类标签 | string | Y | - | | title | 标题 | string | Y | - | | type | 类型 | Boolean | Y | - | | visible | 是否可见 | Boolean | Y | - | | zan | | string | Y | - | | name | 标签内容 | string | Y | - | | url | 标签内容地址 | string | Y | - | | offset | 偏离 | int | Y | - | | over | 结束 | Boolean | Y | - | | pageCount | 总页数 | int | Y | - | | size | 本页条目容量 | int | Y | - | | total | 总记录条数 | int | Y | - | | errorCode | 错误码 | int | Y | - | | errorMsg | 错误信息 | string | Y | - | ## 3.自己的分享的文章列表 ### 1) 请求地址 >https://wanandroid.com/user/lg/private_articles/1/json ### 2) 调用方式:HTTP get ### 3) 接口描述: * 需登陆后才能获取分享的文章列表 ### 4) 请求参数: * 页码,从1开始 ### 5) 请求返回结果: ``` { "data": { "coinInfo": { "coinCount": 33, "level": 1, "nickname": "", "rank": "13618", "userId": 91254, "username": "a**roid607" }, "shareArticles": { "curPage": 1, "datas": [], "offset": 0, "over": true, "pageCount": 0, "size": 20, "total": 0 } }, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | 必填 | 备注 | | ------------- | :------------: | :-----: | :--: | ---: | | data | 返回的具体数据 | string | Y | - | | coinInfo | 该用户积分信息 | string | Y | - | | coinCount | 积分总数 | int | Y | - | | level | 等级 | int | Y | - | | nickname | 昵称 | string | Y | - | | rank | 排名 | string | Y | - | | userId | 用户id | int | Y | - | | username | 用户名 | string | Y | - | | shareArticles | 分页信息 | string | Y | - | | curPage | 当前页码 | int | Y | - | | datas | 文章列表 | string | Y | - | | offset | 偏离 | int | Y | - | | over | 结束 | Boolean | Y | - | | pageCount | 总页数 | int | Y | - | | size | 本页条目容量 | int | Y | - | | total | 总记录条数 | int | Y | - | | errorCode | 错误码 | int | Y | - | | errorMsg | 错误信息 | string | Y | - | ## 4.删除自己分享的文章 ### 1) 请求地址 >https://wanandroid.com/lg/user_article/delete/9475/json ### 2) 调用方式:HTTP post ### 3) 接口描述: * 需登陆后才能进行操作 ### 4) 请求参数: * 文章id,拼接在链接上 ### 5) 请求返回结果: ``` { "data": null, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------: | :----: | | data | 返回的具体数据 | string | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | ## 5.分享文章 ### 1) 请求地址 >https://www.wanandroid.com/lg/user_article/add/json ### 2) 调用方式:HTTP post ### 3) 接口描述: * 注意需要登录后查看,如果为CSDN,简书等链接会直接通过审核,在对外的分享文章列表中展示。 ### 4) 请求参数: #### POST参数: | 字段名称 | 字段说明 | 类型 | 必填 | | -------- | :------: | :----: | :--: | | title | 标题 | string | Y | | link | 链接 | string | Y | ### 5) 请求返回结果: ``` { "data": null, "errorCode": 0, "errorMsg": "" } ``` ### 6) 请求返回结果参数说明: | 字段名称 | 字段说明 | 类型 | | --------- | :------------: | :-----: | | data | 返回的具体数据 | List | | errorCode | 错误码 | int | | errorMsg | 错误信息 | string | # 历史(无api,本地储存) # 书签(无api,本地储存)