Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Awbugl committed Oct 22, 2022
1 parent 5f3ecd5 commit e4105f4
Show file tree
Hide file tree
Showing 21 changed files with 400 additions and 277 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.idea/
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,32 @@ For the deploy tutorial of AUA, please refer to [How to deploy AUA](/deploy.md).
### API Entry

+ [user/info](/user/userinfo.md)
+ [user/best](/user/userbest.md)
+ [user/best30](/user/userbest30.md)
+ [user/info](/user/info.md)
+ [user/best](/user/best.md)
+ [user/best30](/user/best30.md)


+ [song/info](/song/songinfo.md)
+ [song/list](/song/songlist.md)
+ [song/alias](/song/songalias.md)
+ [song/random](/song/songrandom.md)
+ [song/info](/song/info.md)
+ [song/list](/song/list.md)
+ [song/alias](/song/alias.md)
+ [song/random](/song/random.md)


+ [assets/icon](/assets/iconassets.md)
+ [assets/char](/assets/charassets.md)
+ [assets/song](/assets/songassets.md)
+ [assets/icon](/assets/icon.md)
+ [assets/char](/assets/char.md)
+ [assets/song](/assets/song.md)
+ [assets/preview](/assets/preview.md) [^1]


+ [data/update](/data/update.md)
+ [data/theory](/data/theory.md)
+ [data/playdata](/data/playdata.md)
+ [data/density](/data/density.md)
+ [data/challenge](/data/challenge.md) [^2]

[^1]: The `assets/preview` API is not available for release version of AUA. It is provided by [AffPreview](https://github.com/Arcaea-Infinity/Aff2Preview).

[^2]: The `data/challenge` API is not available for release version of AUA.

### Error status

Expand Down
2 changes: 2 additions & 0 deletions assets/charassets.md → assets/char.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## assets/char

> Note: It is not recommended to use this API frequently.
| arguments | description | optional |
|:----------|:-----------------------------|----------|
| partner | partner id | false |
Expand Down
2 changes: 2 additions & 0 deletions assets/iconassets.md → assets/icon.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## assets/icon

> Note: It is not recommended to use this API frequently.
| arguments | description | optional |
|:----------|:-----------------------------|----------|
| partner | partner id | false |
Expand Down
23 changes: 23 additions & 0 deletions assets/preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## assets/preview

> Note: It is not recommended to use this API frequently.
| arguments | description | optional |
|:-----------|:-------------------------------------|-------------------------------------------------|
| songname | any song name for fuzzy querying | true when songid is not null, otherwise false |
| songid | sid in Arcaea songlist | true when songname is not null, otherwise false |
| difficulty | accept format are 3 or byn or beyond | true |

###### Tag

* Enable Cors

#### Example

+ `{apiurl}/botarcapi/assets/preview?songid=ifi`

###### Content-Type

```
image/png
```
2 changes: 2 additions & 0 deletions assets/songassets.md → assets/song.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## assets/song

> Note: It is not recommended to use this API frequently.
| arguments | description | optional |
|:-----------|:-------------------------------------------------------------------|-----------------------------------------------------------|
| songname | any song name for fuzzy querying | true when songid or file is not null, otherwise false |
Expand Down
41 changes: 41 additions & 0 deletions data/challenge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## data/challenge

> Note: It is designed for the release version of AUA, and not available for the release version.
| arguments | description | optional |
|:----------|:--------------------|-------------------------|
| path | request arcapi path | false |
| body | request body | true when body is empty |
| time | request timestamp | true |

#### Allowed pathes

```json5
[
"auth/login",
"user",
"user/me",
"friend/me/delete",
"friend/me/add",
"score/song/friend",
"purchase/me/stamina/fragment",
"world/map/me"
]
```

###### Tag

* Need Token

#### Example

+ `{apiurl}/botarcapi/data/challenge?path=auth/login`

##### Return data (Edited for readability)

```json5
{
"status": 0,
"content": "JfdDAIQBAAAkdLOHw7PyRfWyhkJvH1Xzfevm7quQMwOk5Lc99fD1vgesJ8uf5ZJgPfgtYlYGDu1FLk31AaNAYfGocKoRMMSAlqDc4y/aZxXCn4cGjnJ7ovR9rkCQG8W1sJ9cHuK4CDo="
}
```
42 changes: 42 additions & 0 deletions data/density.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## data/density

> Note: It is a large data set, so it is not recommended to use this API frequently.
| arguments | description | optional |
|:-----------|:-------------------------------------|---------------------------------------------------------|
| songname | any song name for fuzzy querying | true when songid or file is not null, otherwise false |
| songid | sid in Arcaea songlist | true when songname or file is not null, otherwise false |
| difficulty | accept format are 3 or byn or beyond | true |

###### Tag

* Enable Cors

#### Example

+ `{apiurl}/botarcapi/data/density?songid=ifi&difficulty=2`

##### Return data (Edited for readability)

```json5
{
"status": 0,
"content": [
[
1000, // fscore, (score/10000)
115, // fpotential (potential/10)
1 // count
],
[
1000,
116,
1
],
[
1000,
117,
1
]
]
}
```
12 changes: 8 additions & 4 deletions data/playdata.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## playdata
## data/playdata

> Note: It is a large data set, so it is not recommended to use this API frequently.
> Note: It is recommended to use `data/density` API.
| arguments | description | optional |
|:-----------|:-------------------------------------|---------------------------------------------------------|
Expand All @@ -16,14 +20,14 @@

+ `{apiurl}/botarcapi/data/playdata?songid=ifi&difficulty=2&start=1280&end=1288`

##### Return data
##### Return data (Edited for readability)

```json
```json5
{
"status": 0,
"content": [
{
"fscore": 1000,
"fscore": 1000, // (score/10000)
"count": 125
},
{
Expand Down
4 changes: 2 additions & 2 deletions data/theory.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## theory
## data/theory

| arguments | description | optional |
|:-------------|:--------------------------------------------------------------------------------|-------------------------------------------------|
Expand All @@ -17,7 +17,7 @@

##### Return data (Edited for readability)

```json
```json5
{
"status": 0,
"content": {
Expand Down
4 changes: 2 additions & 2 deletions data/update.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## update
## data/update

###### Tag

Expand All @@ -10,7 +10,7 @@

##### Return data

```json
```json5
{
"status": 0,
"content": {
Expand Down
11 changes: 1 addition & 10 deletions deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@
* (optional) add some nodes
* start service

### Nuget Packages Dependencies

| PackageName | Version |
|:----------------------------------------|:--------|
| Microsoft.AspNetCore.Mvc.NewtonsoftJson | 6.0.1 |
| sqlite-net-pcl | 1.7.335 |
| Newtonsoft.Json | 13.0.1 |
| Downloader | 2.3.5 |

### Configuration fields

* config.json
Expand Down Expand Up @@ -63,7 +54,7 @@
* ```bash
socat -d TCP4-LISTEN:6161,reuseaddr,fork TCP4:arcapi-v2.lowiro.com:443
```
* It is highly recommended that set it as a background task using nohup, screen or whatever you like
* It is highly recommended that set it as a background task


* Windows server
Expand Down
14 changes: 8 additions & 6 deletions song/songalias.md → song/alias.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## song/alias

> Note: It is recommended to use `song/list` API as the local cache data source.
| arguments | description | optional |
|:-----------|:---------------------------------------------------------------------------|-------------------------------------------------|
| songname | any song name for fuzzy querying | true when songid is not null, otherwise false |
Expand All @@ -15,12 +17,12 @@

##### Return data

```json
```json5
{
"status": 0,
"content": [
"色号",
"对立色"
]
"status": 0,
"content": [
"色号",
"对立色"
]
}
```
4 changes: 3 additions & 1 deletion song/songinfo.md → song/info.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## song/info

> Note: It is recommended to use `song/list` API as the local cache data source.
| arguments | description | optional |
|:-----------|:---------------------------------------------------------------------------|-------------------------------------------------|
| songname | any song name for fuzzy querying | true when songid is not null, otherwise false |
Expand All @@ -15,7 +17,7 @@

###### Return data

```json
```json5
{
"status": 0,
"content": {
Expand Down
4 changes: 3 additions & 1 deletion song/songlist.md → song/list.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## song/list

> Note: It is a large data set, so it is not recommended to use this API frequently.
###### Tag

* Enable Cors
Expand All @@ -10,7 +12,7 @@

###### Return data (Edited for readability)

```json
```json5
{
"status": 0,
"content": {
Expand Down
4 changes: 3 additions & 1 deletion song/songrandom.md → song/random.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## song/random

> Note: It is recommended to use `song/list` API as the local cache data source.
| arguments | description | optional |
|:-------------|:-------------------------------------------|----------|
| start | range of start (9+ => 9p , 10+ => 10p) | true |
Expand All @@ -22,7 +24,7 @@ var val = rating * 2 + (ratingPlus ? 1 : 0);

###### Return data

```json
```json5
{
"status": 0,
"content": {
Expand Down
Loading

0 comments on commit e4105f4

Please sign in to comment.