@KomeijiSatori
2017-04-05T13:10:26.000000Z
字数 10769
阅读 1376
API Name List
if success
[
{
"id": "864",
"title": "【音MAD】上海紅茶館 ~ Chinese Tea",
"desc": "av2180410,sm25974910\npv和音mad都非常的好,就把它搬过来了。\n作者:青年萨玛\n已授权",
"upload_uid": "671",
"cover": "https://static.otomads.com/v/06cb735c9840feef83d74c4143483726.jpg",
"upload_time": "1485770455",
"zan": "8"
},
{
"id": "569",
"title": "郭洪山教你唱蒙古人",
"desc": "[原创] 本视频为蒙古国宝-呼麦大师郭洪山的练习视频,一般人请勿模仿。",
"upload_uid": "7",
"cover": "https://static.otomads.com/v/d648573f149fec6ed4535e092106e26c.jpg",
"upload_time": "1481070349",
"zan": "16"
}
]
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
[
{
"zh": {
"title": "hhhh",
"content": "balabala",
"href": "balabala",
"time": "1479215924"
},
"en": {
"title": "hhhh",
"content": "balabala",
"href": "balabala",
"time": "1479215924"
},
"ja": {
"title": "hhhh",
"content": "balabala",
"href": "balabala",
"time": "1479215924"
}
},
{
"zh": {
"title": "hhhh2",
"content": "balabala",
"href": "balabala",
"time": "1479215924"
},
"en": {
"title": "hhhh2",
"content": "balabala",
"href": "balabala",
"time": "1479215924"
},
"ja": {
"title": "hhhh2",
"content": "balabala",
"href": "balabala",
"time": "1479215924"
}
}
]
if success:
{
"status":200,
"message":"success"
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
if follow self
{
"status":400,
"message":"error.generic.notAllowFollowSelf"
}
if user not found
{
"status":404,
"message":"error.user.notFound"
}
if following
{
"status":403,
"message":"error.user.Following"
}
if success
{
"status":200,
"message":"success"
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
if unfollow self
{
"status":400,
"message":"error.generic.notAllowUnFollowSelf"
}
if user not found
{
"status":404,
"message":"error.user.notFound"
}
if not following
{
"status":403,
"message":"error.user.notFllowing"
}
if success
{
"count": 3,
"result": [
{
"id": "9",
"username": "琪露诺",
"avatar_link": "https://static.otomads.com/ddc9bb8786f22da9a90f62c6fda7c0f3.jpg"
},
{
"id": "7",
"username": "玉米",
"avatar_link": "https://static.otomads.com/5c597185ead2c13b8ddf99e83b90bd8c.jpg"
},
{
"id": "100",
"username": "BBleae",
"avatar_link": "https://static.otomads.com/03910ee2ee43c0ed0f78f218c2dfe2ca.jpg"
}
]
}
if no any follower && user not found
{
"count": 0,
"result": []
}
if success
{
"count": 2,
"video": [
{
"id": "1",
"title": "大新闻三十分",
"desc": "全ての元凶",
"url": "https://static.otomads.com/v/bignews.mp4",
"upload_uid": "9",
"cover": "https://static.otomads.com/v/67e5aa8c2ea8106767fdddda5c94c1ea.jpg",
"errmsg": "user.video.VideoAuditSuccess",
"status_code": "1",
"upload_time": "1479164047",
"zan": "27",
"is_pass": "1"
},
{
"id": "866",
"title": "【龙女仆】康娜的变态国",
"desc": "转自 sm30486020",
"url": "https://static.otomads.com/1ab196bb253fe635fc5c3616297ba5ce.mp4",
"upload_uid": "9",
"cover": "https://static.otomads.com/v/4c5b592cafbaf28e28f0af176b8b1dab.jpg",
"errmsg": "user.video.VideoAuditSuccess",
"status_code": "1",
"upload_time": "1485803752",
"zan": "4",
"is_pass": "1"
}
]
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
content schema
{
"title":"啊啊后唱戏",
"desc":"我们明年再见"
}
if success
{
"status":200,
"message":"ok"
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
if empty video id
{
"status":403,
"message":"error.video.nullId"
}
if empty content
{
"status":403,
"message":"error.video.invalidContent"
}
if video not exists
{
"status":404,
"message":"error.video.notFound"
}
if it is not video uploader
{
"status":403,
"message":"error.generic.premissionDenied"
}
if title too long
{
"status":403,
"message":"error.video.titleTooLong"
}
if description too long
{
"status":403,
"message":"error.video.descTooLong"
}
content schema
{
"toolkit": [
"拍大师",
"begas"
],
"contact": {
"qq": 3077855320,
"weibo": "",
"twitter": "@satori_moe",
"telegram": "@SaotriKomeiji",
"email": "admin@touhou.cx"
}
}
if success
{
"status":200,
"message":"success"
}
if invaild content
{
"status":403,
"message":"error.video.invalidContent"
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
if success
{
"status":200,
"message":"success"
}
if empty email address
{
"status":403,
"message":"error.user.nullemailAddr"
}
if email address not vaild
{
"status":403,
"message":"error.user.mailNotVaild"
}
{
"count": 1,
"video": [
{
"id": "1",
"title": "大新闻三十分",
"desc": "全ての元凶",
"url": "https://static.otomads.com/v/bignews.mp4",
"upload_uid": "9",
"cover": "https://static.otomads.com/v/67e5aa8c2ea8106767fdddda5c94c1ea.jpg",
"errmsg": " ",
"status_code": "1",
"upload_time": "1479164047",
"zan": "27",
"is_pass": "1",
"tags": "S触,合作",
"upload_user": "琪露诺",
"upload_avatar": "https://static.otomads.com/ddc9bb8786f22da9a90f62c6fda7c0f3.jpg"
}
]
}
if success
{
"status":200,
"message":"success"
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
if success
{
"status":200,
"message":"success",
"cid":1234
}
if success
{
"count": 2,
"comments": [
{
"id": "772",
"uid": "311",
"reply_uid": "0",
"content": "太触力11",
"send_time": "1485858626",
"username": "东方的记者",
"avatar": "https://static.otomads.com/a71b5fb51f75e67094969e41fb5996ee.jpg"
},
{
"id": "762",
"uid": "100",
"reply_uid": "0",
"content": "触,,太触了这个,,,",
"send_time": "1485786276",
"username": "BBleae",
"avatar": "https://static.otomads.com/03910ee2ee43c0ed0f78f218c2dfe2ca.jpg"
}
]
}
{
"status":200,
"message":"error.video.removed",
}
if success
{
"status":200,
"message":"error.video.removed",
}
if success
{
"status":200,
"message":"success",
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
if success
{
"status":200,
"message":"success",
}
if not login
{
"status":401,
"message":"error.generic.notLoggedIn"
}
{
"count": 1,
"video": [
{
"id": "864",
"title": "【音MAD】上海紅茶館 ~ Chinese Tea",
"desc": "av2180410,sm25974910\npv和音mad都非常的好,就把它搬过来了。\n作者:青年萨玛\n已授权",
"upload_uid": "671",
"cover": "https://static.otomads.com/v/06cb735c9840feef83d74c4143483726.jpg",
"upload_time": "1485770455",
"zan": "9",
"is_pass": "1",
"tags": "上海紅茶館",
"upload_user": "寒秋奈琉璃",
"upload_avatar": "https://static.otomads.com/27b9af4887d2163585644afc0d3c26ad.jpg"
}
]
}
{
"count": 1,
"result": [
{
"id": "1",
"title": "大新闻三十分",
"desc": "全ての元凶",
"url": "https://static.otomads.com/v/bignews.mp4",
"upload_uid": "9",
"cover": "https://static.otomads.com/v/67e5aa8c2ea8106767fdddda5c94c1ea.jpg",
"errmsg": " ",
"status_code": "1",
"upload_time": "1479164047",
"zan": "27",
"is_pass": "1",
"upload_user": "琪露诺"
}
]
}
success login
{
"status": 200,
"uid": 5,
"username": "KomeijiSatori",
"avatar": "https://static.otomads.com/074fc85e12b1cf4ced728c4c7cdb1059.jpg"
}
not login
{
"status": 401,
"uid": 0,
"username": "未登录",
"avatar": "https://static.otomads.com/akarin.jpg"
}
{
"id": "5",
"title": "塑料曲奇冒险",
"desc": "[转载] sm18319732 我做不到每次上某站都要翻墙",
"url": "https://static.fruitline.net/c763a0cbd5008d62a27ddd9202ec9c1c.mp4",
"upload_uid": "21",
"cover": "https://static.otomads.com/v/2b9aecb12c2c863e67f3f71316f39dfb.jpg",
"errmsg": " ",
"status_code": "1",
"upload_time": "1479185928",
"zan": "22",
"is_pass": "1",
"tags": null,
"upload_user": "HOMO馆馆主",
"upload_avatar": "https://static.otomads.com/ae135cf7134f7efe29fa8f3bfae8368f.jpg"
}
{
"count": 1,
"video": [
{
"id": "966",
"title": "Pickles",
"desc": "2017年是刚开头!",
"url": "https://static.otomads.com/24e95d73493f2b2f41a6651adac43860.mp4",
"upload_uid": "367",
"cover": "https://static.otomads.com/v/1cb3406d5593b6ae9775945626bfe690.jpg",
"errmsg": " ",
"status_code": "1",
"upload_time": "1487437540",
"zan": "4",
"is_pass": "1"
}
]
}
start:1 end:1
{
"count": "480",
"video": [
{
"id": "996",
"title": "Naked Fighter",
"desc": "https://www.youtube.com/watch?v=55ZKUzVi7XY",
"url": "https://static.otomads.com/d240333e40b9c87c6d16c43029446df9.mp4",
"upload_uid": "115",
"cover": "https://static.otomads.com/v/26a88ea16d5fc578358fd838ecbde128.jpg",
"zan": "1",
"upload_time": "1488407458",
"upload_user": "Meta"
}
]
}
if type is Get: id(video id)
if type is Post: content(danmaku,json format)
danmaku schema
{
"token": "otomads",
"player": "998", //video id
"author": "nobody",
"time": 0,
"text": "好!",
"color": "#fff",
"type": "right"
}
type Get:
{
"code": 1,
"danmaku": [
{
"id": "321",
"author": "琪露诺",
"time": "0",
"text": "厉害",
"color": "#fff",
"type": "right",
"player": "864"
}
]
}
type Post:
{
"code": 1,
"msg": "success"
}
如果接口文档缺失或接口不正确,请Telegram @SatoriKomeiji 或邮件至komeiji@satori.moe