NAV
shell

关于

Serverless 版 API 服务

运行环境: 阿里云 Serverless

部署工具: Github Workflow + Funcraft

源码仓库: https://github.com/serverless-aliyun/fun-doc

Issues: https://github.com/serverless-aliyun/fun-doc/issues

统计

调用次数统计

curl -X GET "https://fun.dongfg.com/stats/service"

The above command returns JSON structured like this:

{
  "data": {
    "totalInvocations": 671,
    "services": [
      {
        "name": "crawler",
        "invocations": 487
      },
      {
        "name": "docs",
        "invocations": 184
      }
    ]
  },
  "msg": "success",
  "timestamp": 1600063094
}

统计本月计费请求调用次数,总调用次数及每个 service 的调用次数

HTTP Request

GET https://fun.dongfg.com/stats/service

处理时间统计

curl -X GET "https://fun.dongfg.com/stats/function"

The above command returns JSON structured like this:

{
  "data": [
    {
      "name": "statping/index",
      "duration": 3.885768253968254
    },
    {
      "name": "crawler/nanjing-edu",
      "duration": 7753.4582020202015
    },
    {
      "name": "docs/index",
      "duration": 2.4151809523809527
    },
    {
      "name": "fc-domain-challenge/fc-15ff2db0-f42c-11ea-892d-024215000304-29828077",
      "duration": 12.11
    },
    {
      "name": "fun-doc/fun-doc",
      "duration": 100
    }
  ],
  "msg": "success",
  "timestamp": 1600063100
}

统计本月各个函数的平均响应时间

HTTP Request

GET https://fun.dongfg.com/stats/function

剧集

剧集搜索

curl -X GET "https://fun.dongfg.com/series?keyword=权力的游戏&details=true"

The above command returns JSON structured like this:

{
  "data": [
    {
      "id": "10733",
      "cnName": "权力的游戏",
      "poster": "http://tu.jstucdn.com/ftp/2019/0322/d2b4282fe50dffaad4c73b6f3d6176ff.jpg",
      "enName": "Game of Thrones",
      "link": "http://www.rrys2020.com/resource/10733",
      "rssLink": "http://rss.rrys.tv/rss/feed/10733",
      "area": "美国",
      "category": "战争/剧情/魔幻/历史/古装/史诗"
    },
    {
      "id": "35844",
      "cnName": "权力的游戏:征服与反抗",
      "poster": "http://tu.jstucdn.com/ftp/2017/1214/754eb87fb49adbadcbbe46348370ff73.jpg",
      "enName": "Game of Thrones: Conquest and Rebellion",
      "link": "http://www.rrys2020.com/resource/35844",
      "area": "美国",
      "category": "动画"
    }
  ],
  "msg": "success",
  "timestamp": 1595403185
}

通过关键字搜索剧集

HTTP Request

GET https://fun.dongfg.com/series

Query Parameters

Parameter Default Description
keyword 搜索关键字
details false 是否返回详情, false 时仅返回 id, cnName, poster

获取剧集详情

curl -X GET "https://fun.dongfg.com/series/10733"

The above command returns JSON structured like this:

{
  "data": {
    "id": "10733",
    "cnName": "权力的游戏",
    "poster": "http://tu.jstucdn.com/ftp/2019/0322/d2b4282fe50dffaad4c73b6f3d6176ff.jpg",
    "enName": "Game of Thrones",
    "link": "http://www.rrys2020.com/resource/10733",
    "rssLink": "http://rss.rrys.tv/rss/feed/10733",
    "area": "美国",
    "category": "战争/剧情/魔幻/历史/古装/史诗"
  },
  "msg": "success",
  "timestamp": 1595403802
}

获取剧集详情详细信息, 等价于搜索时加 details=true.

HTTP Request

GET https://fun.dongfg.com/series/<ID>

URL Parameters

Parameter Description
ID 搜索返回的 id

获取剧集下载地址

curl -X GET "https://fun.dongfg.com/series/10733/episodes"

The above command returns JSON structured like this:

{
  "msg": "success",
  "timestamp": 1595403802,
  "data": [
    {
      "seriesId": "10733",
      "name": "权力的游戏.Game.of.Thrones.S08E03.中英字幕.WEBrip.720P-人人影视.mp4",
      "season": 8,
      "episode": 3,
      "ed2k": "ed2k://|file|%E6%9D%83%E5%8A%9B%E7%9A%84%E6%B8%B8%E6%88%8F.Game.of.Thrones.S08E03.%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95.WEBrip.720P-%E4%BA%BA%E4%BA%BA%E5%BD%B1%E8%A7%86.V1.mp4|1240802301|946a2ef12f9f128403a208c44c596b99|h=a7a7j5whhhih57fsl2eckv5mlnzzokgr|/",
      "magnet": "magnet:?xt=urn:btih:702778ba56195ed3844bb92e059d320539c530ec"
    }
  ]
}

获取剧集下载地址, 包含 ed2k/magnet 地址及对应 Season Episode 信息.

HTTP Request

GET https://fun.dongfg.com/series/<ID>/episodes

URL Parameters

Parameter Description
ID 搜索返回的 id

信用卡消费邮件

招行-每日信用管家

curl -X POST "https://fun.dongfg.com/ebill/cmb" -d '{"username": "xxxxx", "password": "yyyyyy", "hour": 24}'

The above command returns JSON structured like this:

{
  "data": [
    {
      "name": "尾号3885 消费 支付宝-xxxxx有限公司",
      "time": "2020-09-21 07:53:41",
      "amount": "8.00"
    },
    {
      "name": "尾号3885 消费 支付宝-xxxx",
      "time": "2020-09-21 11:35:57",
      "amount": "17.00"
    }
  ],
  "msg": "success",
  "timestamp": 1600757374
}

解析邮件获取最近的消费记录

HTTP Request

POST https://fun.dongfg.com/ebill/cmb

JSON Body Fields

Field Default Description
username 邮箱用户名
password 邮箱密码
hour 24 解析的邮件范围,可为空,默认 24 小时

HTTP 错误状态码

正常请求返回 200

Error Code Meaning
400 请求参数有误
500 服务无法正常响应.