-
Notifications
You must be signed in to change notification settings - Fork 0
v1 ship cg
CG images of the ship girls in PNG format. This API is only used to further request the CGs of the ship girls inquired
according to the constructed requests of the ship/cg
API in the cg
field in the response after querying
the ship/info
API. Of course, as long as you know the exact parameter values, you can directly construct a request for
this API by referring to this document.
PNG格式的舰娘CG图片。 此API仅作为在查询ship/info
API后,根据其响应中的cg
字段中对ship/cg
API的构造好的请求, 进一步请求所查询舰娘的图片。
当然只要你知道明确的参数值,你可以参照本文档直接构造对此API的请求。
Request url example 示例URL:
http://domain/v1/ship/cg? shipid=1
[& cgid=n1
]
For details, please refer to the corresponding section below.
具体属性介绍请参见下文对应部分。
parameter name | must required parameter | values | default value | brief description |
---|---|---|---|---|
shipid | Yes | custom input | N/A | represent for one ship's one model, one record in the database |
cgid | Yes |
n0 n0-1 n1 n1-1 n2 n3 n8 n9 n10 n11 e{seasonal cg id*} d{seasonal cg id} a
|
N/A | represent for one CG image |
-
seasonal cg id
is the id in exillusts.nedb, generally you can't get one ship's seasonal cg id before requestship/info
API and get response, that's what I said "should requestship/info
first".
参数名 | 是否必须 | 取值 | 默认值 | 简单说明 |
---|---|---|---|---|
shipid | 是 | 用户输入 | N/A | 该id表示数据库中单个舰娘的单个形态 |
cgid | 是 |
n0 n0-1 n1 n1-1 n2 n3 n8 n9 n10 n11 e{seasonal cg id*} d{seasonal cg id} a
|
N/A | 表示确切的某张CG |
-
seasonal cg id
是exillusts.nedb 中的id,表示季节限定立绘,一般需要先请求ship/info
API才能(从响应中的cg
字段) 得知该舰娘的季节限定立绘id,这就是上文所说的不太能直接构造请求的原因。
must required parameter? | 是否必须? | Yes |
---|---|---|
- | - | - |
-
Number format.
-
Represent for one ship's one model, one record in the database.
-
数字格式
-
表示数据库中单个舰娘的单个形态
must required parameter? | 是否必须? | Yes |
---|---|---|
- | - | - |
-
String format.
-
Combined with cg type abbreviation and cg number.
-
cgid
= first letter fortype abbreviation
+ remain part forcg number
. - example:
cgid
=n1-1
,type abbreviation
=n
,cg number
=1-1
.
-
-
Type abbreviations:
-
n
for normal cg, -
e
for seasonal cg whole_body version, -
d
for seasonal cg whole_body_damaged version, -
a
for mian's screenshot on all cgs of one ship girl.
-
-
Cg number:
- for normal cg, number is image file name,
- for seasonal cg, number is seasonal cg id
- (seasonal cg id represent a database record, as while as a sub-directory of seasonal cg directory,in where seasonal cg stored)
- for all-in-one cg (screenshot on all CGs of one ship girl), there is no cg number, we'll search image by ship's Chinese name. (because these files are named in Chinese)
-
字符串格式
-
cgid 是
CG类型缩写
与CG数字
的连接字符串,第一个字母是类型缩写
,其余部分是CG数字
- 举例: example:
cgid
=n1-1
,类型缩写
=n
,CG数字
=1-1
.
- 举例: example:
-
类型缩写共4种:
-
n
常规CG,比如普通立绘,卡片形式 -
e
限定立绘的非中破图片 -
d
限定立绘的中破图片 -
a
眠对萌百网页的截图,截图包含了单个舰娘的全部CG,包括常规与限定。
-
-
CG数字:
- 对常规CG,数字是图片文件名。
- 对限定CG,CG是图片目录名。
- 对眠的截图,需要用
shipid
查询数据库获取舰娘中文名,因为截图文件是用中文命名的。
HTTP response status codes - MDN web docs
code | massage | explanation |
---|---|---|
200 | OK | The server found ship id exists in database, and successfully found the requested image. |
400 | Bad Request | There is something wrong in request params, maybe unsupported format, unreasonable value... readable explanation will be sent with response as body. |
404 | Not Found | Server couldn't find shipid in request in database, or couldn't find requested image, or can't process that image. |
500 | Internal Server Error | Unhandled error occurred when server processing request, tell the server administrator to check log or report it as an issue on issue page. |
Take Shiratsuyu Class Destroyer: Murasame as an example.
以白露型驱逐舰:村雨为例。
Request url: host/v1/ship/cg? shipid=498
& cgid={}
cgid value |
description | image |
---|---|---|
n0 |
banner | |
n0-1 |
banner_masked | |
n1 |
banner_dmged | |
n1-1 |
banner_dmged_masked | |
n2 |
card` | |
n3 |
card_dmged | |
n8 |
whole_body | |
n9 |
whole_body_dmged | |
n10 |
head_masked | |
n11 |
head_dmged_masked | |
e20 |
seasonal_whole_body | |
d20 |
seasonal_whole_body_dmged | |
a |
mian's screenshot |