简要描述:

  • 获取文件和文件夹列表。
    通过本接口可以获取以下特定的文件和文件夹列表,1. 指定文件夹列表。2. 数据排序。3. 文件类型。4. 关键字。

接口版本:

版本号 制定人 制定日期 修订日期
1.0 Joe 2020-05-20 2020-05-20

请求URL:

请求参数:

参数名 是否必须 类型 说明
folder_id string 当前目录文件夹ID,根目录为d0
start int 起始位置,默认每次获取50条数据
reload int 1 为获取0至start位置的所有数据,默认为0,从start获取50条数据
orderby string old,az,za,big,small,new。new,old新旧排序,az,za,A-Z/Z-A排序,big,small,从文件大到小,小到大排序, 共6个排序方式,客户端需要本地记录用户排序偏好,如果留空则默认为”new”从新到旧
filter string video,music,picture,document,app,zip,other。默认为空,即全部文件类型
keyword string 列举包含关键字的文件和文件夹

请求示例:

POST /v1/private/file/list HTTP/1.1
HOST: rest.ctfile.com
content-type: application/json
content-length: 134

{
  "filter": "null",
  "folder_id": "d0",
  "orderby": "old",
  "start": "0",
  "session": "ff6cf1d8b56c41d1da684ea3bc3df6eb"
}

返回示例:

正常返回:

{"code":200,"num":12,"folder_id":"d0","folder_path":"\/","results":[{"key":"d389861","icon":"folder","name":"\u4e66\u7c4d\u4e66\u7c4d","date":1473237859,"status":1},{"key":"d2460690","icon":"folder","name":"11111","date":1504916592,"status":1},{"key":"d3568769","icon":"folder","name":"2","date":1517894645,"status":1},{"key":"d8679232","icon":"folder","name":"\u683c\u5f0f","date":1545278857,"status":1},{"key":"d27086518","icon":"folder","name":"\u6211\u7684\u6536\u85cf","date":1593072467,"status":1},{"key":"f770715220","icon":"apk","name":"\u8def\u8fb9\u793elbs\u76f4\u64adepg\u7248.apk","imgsrc":"","size":13649631,"date":1592805294,"status":1},{"key":"f782135505","icon":"apk","name":"\u4f18\u770bTV(\u5bc6\u7801522).apk","imgsrc":"","size":18347816,"date":1593822911,"status":1},{"key":"f783382481","icon":"apk","name":"dysp_146180.apk","imgsrc":"","size":67727633,"date":1593945177,"status":1},{"key":"f784330470","icon":"apk","name":"TiktokGirl.apk","imgsrc":"","size":2399679,"date":1594021161,"status":1},{"key":"f787983138","icon":"apk","name":"\u9884\u8a00\u5bb61.7(\u5fc3\u67d4\u7834\u89e3).apk","imgsrc":"","size":3117964,"date":1594442265,"status":1},{"key":"f795874776","icon":"apk","name":"\u6b27\u6d3e\u52a8\u6f2b v3.1.5.apk","imgsrc":"","size":1634640,"date":1594707357,"status":1},{"key":"f799132434","icon":"apk","name":"mshow.apk","imgsrc":"","size":19992040,"date":1594794317,"status":1},{"key":"f806659611","icon":"jpg","name":"Screenshot_20200721_125248_com.chengtong.ctnetworkdisk.jpg","imgsrc":"https:\/\/dynamic-media-cdn.tripadvisor.com\/media\/photo-o\/14\/c1\/a5\/f9\/vidam-park.jpg?w=500&h=800","size":156189,"date":1595307547,"status":1},{"key":"f817734184","icon":"apk","name":"\u30106.15\u3011S.S.G_1.9.3.apk","imgsrc":"","size":27963930,"date":1596276304,"status":1},{"key":"f822498899","icon":"file","name":"Viscosity_1.8.6(1546)\u3010\u6253\u5f00\u9009\u62e9\u5176\u5b83\u4e0b\u8f7d\u65b9\u5f0f\u3011.rtf","imgsrc":"","size":3103,"date":1596684425,"status":1},{"key":"f824800886","icon":"mp4","name":"\u3010lol\u7535\u5f71\u5929\u5802www.loldytt.com\u3011(loldytt.net)\u4f0a\u6ce2\u62c9\u75c5\u6bd2.\u672a\u5220\u51cf.\u9ad8\u6e05DVD\u56fd\u7ca4\u53cc\u8bed\u4e2d\u5b57(loldytt.com).mp4","imgsrc":"https:\/\/dynamic-media-cdn.tripadvisor.com\/media\/photo-o\/14\/c1\/a5\/f9\/vidam-park.jpg?w=500&h=800","size":1435307749,"date":1596868592,"status":1},{"key":"f824800889","icon":"mkv","name":"\u3010LOL\u7535\u5f71\u5929\u5802www.loldytt.com\u3011[\u519b\u5993\u6170\u5b89\u5987].Comfort.Women.1992.LDVDRip.HALFCD.2Audios.cnensubbed-edit110(loldytt.com).mkv","imgsrc":"https:\/\/dynamic-media-cdn.tripadvisor.com\/media\/photo-o\/14\/c1\/a5\/f9\/vidam-park.jpg?w=500&h=800","size":734268228,"date":1596868597,"status":1}]}

错误时返回:

{"code":403,"message":"错误描述"}

返回参数说明:

参数名 类型 说明
key string 文件ID
icon string 文件图标
imgsrc string 视频/图片的缩略图URL
name string 文件名称
size long 文件大小(bytes)
date timestamp 文件上传时间
status int 1: complete, 2: incomplete。如果为2,属于incomplete的状态,那请添加个未完成的icon(未完成的文件不支持下载、打包、解压)

备注:

  • 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2020-08-12 13:25   作者:admin