博客园API文档,非官方文档,从博客园后台的网络通信过程中总结
请求方式: GET
请求地址: https://i.cnblogs.com/api/category/blog/1/edit
参数列表:
| 参数名 | 类型 | 必须 | 描述 | 示例 |
|---|---|---|---|---|
| / |
详细说明: 根据用户Cookie获取用户的随笔分类的列表
请求示例:
1https://i.cnblogs.com/api/category/blog/1/edit
成功返回示例:
xxxxxxxxxx111[2 {3 "categoryId": 1895777,4 "title": "Bug Solution",5 "visible": true,6 "description": "Windows、Linux使用过程中的bug解决办法",7 "updateTime": "2022-01-08T21:45:04.607",8 "count": 3,9 "order": null10 }11]未授权返回示例:
x
1{2 "errors": [3 "Unauthorized"4 ],5 "type": 16}
请求方式: GET
请求地址: https://i.cnblogs.com/api/posts/list
参数列表:
| 参数名 | 类型 | 必须 | 描述 | 示例 |
|---|---|---|---|---|
| p | int | 是 | 页数,第几页 | 1 |
| cid | int | 否 | 分类id,获取分类下的文章。空为所有文章 | 1895777 |
| tid | 否 | |||
| t | int | 是 | 文章类型:随笔为1,文章为2,日记为128 | 1 |
| cfg | 否 | |||
| search | 否 | |||
| orderBy | 否 | |||
| scid | 否 |
详细说明:分页获取用户的随笔列表,每页只能获取10个
请求示例:
xxxxxxxxxx11https://i.cnblogs.com/api/posts/list?p=1&cid=&tid=&t=1&cfg=0&search=&orderBy=&scid=
返回示例:
xxxxxxxxxx281{2 "postList": [3 {4 "id": 16013455,5 "title": "Windows oh my zsh终极解决方案,还得是WSL",6 "url": "//www.cnblogs.com/yunmuq/p/16013455.html",7 "isPublished": false,8 "isDraft": true,9 "feedBackCount": 0,10 "webCount": 0,11 "aggCount": 0,12 "viewCount": 0,13 "datePublished": "2022-03-16T16:51:00",14 "entryName": null,15 "postType": 1,16 "postConfig": 16888,17 "dateUpdated": "2022-03-17T15:40:00",18 "accessPermission": 0,19 "isInSiteHome": false,20 "isInSiteCandidate": false,21 "isMarkdown": true22 }23 ],24 "postsCount": 46,25 "pageIndex": 1,26 "pageSize": 10,27 "categoryName": ""28}请求方式: GET
请求地址:https://i.cnblogs.com/api/posts/{id}
参数列表:
| 参数名 | 类型 | 必须 | 描述 | 示例 |
|---|---|---|---|---|
| id | int | 是 | 随笔id | 15980094 |
详细说明:分页获取用户的随笔列表,每页只能获取10个
请求示例:
xxxxxxxxxx11https://i.cnblogs.com/api/posts/15980094
返回示例:
xxxxxxxxxx531{2 "blogPost": {3 "id": 15980094,4 "postType": 1,5 "accessPermission": 0,6 "title": "【教程】电脑怎么禁用主板蓝牙,使用蓝牙适配器?",7 "url": "//www.cnblogs.com/yunmuq/p/15980094.html",8 "postBody": "<br></br>\n有时主板蓝牙出毛病,比如蓝牙耳机播放卡顿,蓝牙版本过低等,购买了新的USB蓝牙适配器,怎么正确使用呢?...",9 "categoryIds": [10 189987411 ],12 "inSiteCandidate": false,13 "inSiteHome": false,14 "siteCategoryId": null,15 "blogTeamIds": [],16 "isPublished": true,17 "displayOnHomePage": true,18 "isAllowComments": true,19 "includeInMainSyndication": true,20 "isPinned": false,21 "isOnlyForRegisterUser": false,22 "isUpdateDateAdded": false,23 "entryName": null,24 "description": "",25 "featuredImage": null,26 "tags": [],27 "password": null,28 "datePublished": "2022-03-08T13:52:00",29 "isMarkdown": true,30 "isDraft": false,31 "autoDesc": "有时主板蓝牙出毛病,比如蓝牙耳机播放卡顿,蓝牙版本过低等,购买了新的USB蓝牙适配器,怎么",32 "changePostType": false,33 "blogId": 650454,34 "author": "云牧青",35 "removeScript": false,36 "clientInfo": null,37 "changeCreatedTime": false,38 "canChangeCreatedTime": false,39 "isContributeToImpressiveBugActivity": false40 },41 "myConfig": {42 "canInSiteCandidate": false,43 "noSiteCandidateMsg": "发布时间超过10小时的随笔不能投稿到首页候选区",44 "canInSiteHome": false,45 "noSiteHomeMsg": "发布时间超过1小时的随笔不能投稿到网站首页",46 "myTeamCollection": [],47 "editor": {48 "id": 5,49 "host": "//common.cnblogs.com",50 "cdnRefreshId": null51 }52 }53}