Skip to content

Accelerider Web API DOC

Dingping Zhang edited this page Apr 1, 2017 · 2 revisions

Accelerider API DOC

注册:

  • POST http://api.pescn.top/signup
params type description
security GET 关于提交密码的加密,可选值:{ "RSA", "MD5", "Express" }
name POST 用户名
password POST 密码
  • 返回示例:
{
    "errno": 0,
    "message": ""
}
  • 注:RSA还没完成

登陆:

  • POST http://api.pescn.top/signin
params type description
security GET 关于提交密码的加密,可选值:{ "RSA", "MD5", "Express" }
name POST 用户名
password POST 密码
  • 返回示例
{
    "errno": 0,
    "message": "",
    "token": "xxxx"
}
  • 注:RSA还没完成

绑定账号:

  • POST http://api.pescn.top/binding
params type description
token GET 登陆后返回
cookies POST 需要绑定的Cookies,Dictionary序列化为JSON后的值
  • 请求示例
cookies=
{
    "Cookie Key":"Cookie Value"
}
  • 返回示例
{
    "errno": 0,
    "message": "",
    "username": "you username"
}

获取绑定的账户列表:

  • GET http://api.pescn.top/userlist
params type description
token GET 登陆后返回
  • 返回示例
{
    "errno": 0,
    "userlist": [
        {
            "Name": "you username",
            "Uk": you uk
        }
    ]
}

获取百度账户详情:

  • GET http://api.pescn.top/userinfo
params type description
token GET 登陆后返回
uk GET 用于指定百度账户
  • 返回示例:
{
    "total": total space,
    "free": free space,
    "used": used space,
    "username": "you username",
    "nick_name": "you nickname",
    "avatar_url": "hand image url",
    "errno": 0
}

获取文件列表:

  • GET http://api.pescn.top/filelist
params type description
token GET 登陆后返回
uk GET 用于指定百度账户
path GET 需要获取的目录
  • 返回示例
{
    "list"[
        {
            "fs_id": file id,
            "server_ctime": create time in server,
            "server_mtime": modify time in server,
            "local_ctime": create time in local,
            "local_mtime": modify time in local,
            "size": file size,
            "isdir": dir,
            "dir_empty": dir empty,
            "path": "file path",
            "server_filename": "file name",
            "empty": is empty,
            "md5": "file md5 hash"
        }
    ]
    "errno": 0,
    "message": null
}

获取文件下载地址

  • POST http://api.pescn.top/filelinks
params type description
token GET 登陆后返回
uk GET 用于指定百度账户
method GET 指定下载方案,可选 {"APPID","JUMP","DEFAULT"} (文件小于30M请使用APPID 否则JUMP DEFAULT是在JUMP无法使用时备用)
files POST 请求下载的文件
  • 参数示例
files=
[
    {
        "path": "file path",
        "id": fs_id
    }
]
  • 返回示例
{
    "urls": {
        "file A": {
            "urls": [
                {
                    "url": "Download URL A"
                },
                {
                    "url": "Download URL B"
                }
            ]
        }
    },
    "cookies": Requst Cookies,
    "errno": 0,
    "message": null
}
  • 注:如果有文件获取失败,urls将为null