· 6 years ago · Oct 29, 2019, 11:46 AM
1swagger: "2.0"
2info:
3 description: "适用于ACG领域的文件储存API."
4 version: "0.0.2"
5 title: "Akatsuki API"
6 termsOfService: "/"
7host: "storage.moe.workers.dev"
8basePath: "/"
9tags:
10- name: "Main"
11 description: "Everything about Akatsuki."
12schemes:
13- "https"
14- "http"
15paths:
16 /down/{Key}/{Secret}/{Contents}:
17 get:
18 tags:
19 - "Main"
20 summary: "[Dev] 文件下载URL"
21 description: "原则上应该使用/gen/获取的地址进行访问。"
22 consumes:
23 - "multipart/form-data"
24 produces:
25 - "application/text"
26 parameters:
27 - name: "Key"
28 in: "path"
29 description: ""
30 required: true
31 type: "string"
32 - name: "Secret"
33 in: "path"
34 description: ""
35 required: true
36 type: "string"
37 - name: "Contents"
38 in: "path"
39 description: "完整路径"
40 required: true
41 type: "string"
42 responses:
43 200:
44 description: "请求成功完成,一般返回为直接下载文件。"
45 /gen/{Contents}:
46 get:
47 tags:
48 - "Main"
49 summary: "获取资源URL"
50 description: ""
51 consumes:
52 - "multipart/form-data"
53 produces:
54 - "application/text"
55 parameters:
56 - name: "Contents"
57 in: "path"
58 description: "完整路径"
59 required: true
60 type: "string"
61 responses:
62 200:
63 description: "请求成功完成,将生成一个有效期为24小时的链接。"
64 /update:
65 get:
66 tags:
67 - "Main"
68 summary: "获取新番更新"
69 description: "从bangumi.moe抓取更新并进行预处理。"
70 produces:
71 - "application/json"
72 responses:
73 200:
74 description: "请求成功完成,返回值应为合理的json内容。"
75 /upload:
76 post:
77 tags:
78 - "Main"
79 consumes:
80 - "multipart/form-data"
81 produces:
82 - "application/json"
83 parameters:
84 - name: "Keyid"
85 in: "path"
86 description: "ID of pet to update"
87 required: true
88 type: "integer"
89 - name: "file"
90 in: "formData"
91 description: "file to upload"
92 required: true
93 type: "file"
94 summary: "文件上传接口"
95 description: "上载文件到存储区域。"
96 responses:
97 200:
98 description: "上载成功完成,返回值预期为文件下载URL。"
99 security:
100 - api_key: []
101securityDefinitions:
102 api_key:
103 type: "apiKey"
104 name: "api_key"
105 in: "header"