Skip to content

Commit 8b1d484

Browse files
committed
Update Code
1 parent b2ecfad commit 8b1d484

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed

Beans/Json/ArcSongdata.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ public class ArcSongdata
1616
public int Score { get; set; }
1717

1818
[JsonProperty("shiny_perfect_count")]
19-
public string MaxPure { get; set; }
19+
public string MaxPure { get; set; } = "?";
2020

2121
[JsonProperty("perfect_count")]
22-
public string Pure { get; set; }
22+
public string Pure { get; set; } = "?";
2323

2424
[JsonProperty("near_count")]
25-
public string Far { get; set; }
25+
public string Far { get; set; } = "?";
2626

2727
[JsonProperty("miss_count")]
28-
public string Lost { get; set; }
28+
public string Lost { get; set; } = "?";
2929

3030
[JsonProperty("time_played")]
3131
public long TimePlayed { get; set; }

ImageAPI.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,27 @@ private static FileStreamResult FileStreamResult(BackGround backGround)
2626
}
2727

2828
[HttpPost("user/best30")]
29-
public async Task<FileStreamResult> GetUserBest30([FromBody] ResponseRoot<UserBestsContent> json, ImgVersion imgVersion)
29+
public async Task<FileStreamResult> GetUserBest30(
30+
[FromBody] ResponseRoot<UserBestsContent> json,
31+
[FromQuery(Name = "image_version")] ImgVersion imgVersion)
3032
{
3133
var backGround = await GetBestsGeneratorImage(json.Content, imgVersion);
3234
return FileStreamResult(backGround);
3335
}
3436

3537
[HttpPost("user/best")]
36-
public async Task<FileStreamResult> GetUserBest([FromBody] ResponseRoot<UserBestContent> json, ImgVersion imgVersion)
38+
public async Task<FileStreamResult> GetUserBest(
39+
[FromBody] ResponseRoot<UserBestContent> json,
40+
[FromQuery(Name = "image_version")] ImgVersion imgVersion)
3741
{
3842
var backGround = await RecordGenerator.Generate(json.Content, imgVersion);
3943
return FileStreamResult(backGround);
4044
}
4145

4246
[HttpPost("user/info")]
43-
public async Task<FileStreamResult> GetUserInfo([FromBody] ResponseRoot<UserInfoContent> json, ImgVersion imgVersion)
47+
public async Task<FileStreamResult> GetUserInfo(
48+
[FromBody] ResponseRoot<UserInfoContent> json,
49+
[FromQuery(Name = "image_version")] ImgVersion imgVersion)
4450
{
4551
var backGround = await RecordGenerator.Generate(json.Content, imgVersion);
4652
return FileStreamResult(backGround);

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,25 @@
1111
> 您应知悉,使用本项目将违反 [Arcaea使用条款](https://arcaea.lowiro.com/zh/terms_of_service) 中的 3.2-4 和 3.2-6,以及 [Arcaea二次创作管理条例](https://arcaea.lowiro.com/zh/derivative_policy)
1212
>
1313
> 因使用本项目而造成的损失,Andreal开发组不予承担任何责任。
14+
15+
#### 对外API
16+
17+
- `POST /user/best30/` 生成用户的最近30首谱面的查分图
18+
- `image_version` 图片类型,作为查询参数,可选值为 `1``2`
19+
- `body` UnofficialArcaeaAPI 的对应API的返回值,作为请求体
20+
21+
- `POST /user/best/` 生成用户的最高分数样式的查分图
22+
- `image_version` 图片类型,作为查询参数,可选值为 `1``2``3`
23+
- `body` UnofficialArcaeaAPI 的对应API的返回值,作为请求体
24+
25+
- `POST /user/info/` 生成用户的最近分数样式的查分图
26+
- `image_version` 图片类型,作为查询参数,可选值为 `1``2``3`
27+
- `body` UnofficialArcaeaAPI 的对应API的返回值,作为请求体
28+
29+
* UnofficialArcaeaAPI 的返回值格式请参考 [UnofficialArcaeaAPI.Docs](https://github.com/Arcaea-Infinity/UnofficialArcaeaAPI.Docs)
30+
31+
#### 本地部署
32+
33+
1. 下载本项目的[release版本](https://github.com/Awbugl/AndrealImageGenerator/releases/)
34+
35+
2. 运行 `AndrealImageGenerator.exe` 即可启动服务

0 commit comments

Comments
 (0)