|
18 | 18 | #### All template use WebApi to deal the operate
|
19 | 19 | #### Recommand Vue.js, but you still can use jQuery(Ajax) :D
|
20 | 20 | #### All Response Code (Int)
|
21 |
| -##### `10000` `Success` |
| 21 | +##### `10000` `Success` `Successfully requested` |
| 22 | +##### `20000` `No enough times` `No enough times to song` |
| 23 | +##### `30000` `Forbidden` `Wrong Access (For User)` |
22 | 24 |
|
23 |
| -## Front(User) |
| 25 | +## Front (User) |
24 | 26 |
|
25 | 27 | ### Index Page
|
26 | 28 | #### The index page use the root path ("/"),
|
|
45 | 47 | ###### `name` `string` `name of song`
|
46 | 48 | ###### `artists` `list` `list of artists`
|
47 | 49 | ###### `album` `dict` `album of this song`
|
48 |
| -###### `url` `string` `the media url of this song` |
| 50 | +###### `url` `string` `the media url of this song (source platform or system cache)` |
49 | 51 | ##### List of Artists Args:
|
50 | 52 | ###### `id` `int` `artist id(platform)`
|
51 | 53 | ###### `name` `string` `name of this artist`
|
|
57 | 59 |
|
58 | 60 | ### History Page
|
59 | 61 | #### The history page use the path "/history"
|
60 |
| -#### Anybody can directly get history of songs |
| 62 | +#### Anybody can directly get the history of songs |
61 | 63 | #### WebApi Interface Detail:
|
62 | 64 | ##### Path: `/api/history`
|
63 | 65 | ##### Method: `GET`
|
64 | 66 | ##### Args: `Nothing`
|
65 | 67 | ##### Response Format: `Json`
|
66 | 68 | ##### Json Args:
|
67 | 69 | ###### `code` `int` `response code`
|
68 |
| -###### `content` `list` `list of history songs` |
| 70 | +###### `content` `list` `list of history songs` |
| 71 | +##### List of Songs Args(content): |
| 72 | +###### `pid` `int` `platform id` |
| 73 | +###### `id` `int` `song id(platform)` |
| 74 | +###### `name` `string` `name of song` |
| 75 | +###### `artists` `list` `list of artists` |
| 76 | +###### `album` `dict` `album of this song` |
| 77 | +###### `url` `string` `the media url of this song (system cache)` |
| 78 | +##### List of Artists Args: |
| 79 | +###### `id` `int` `artist id(platform)` |
| 80 | +###### `name` `string` `name of this artist` |
| 81 | +###### `cover` `string` `image url of this aritist` |
| 82 | +##### Album Args: |
| 83 | +###### `id` `int` `album id(platform)` |
| 84 | +###### `name` `string` `name of this album` |
| 85 | +###### `cover` `string` `image url of this album` |
| 86 | + |
| 87 | +### List Page |
| 88 | +#### The list page use the path "/list" |
| 89 | +#### Anybody can directly get the list of whitelist and blacklist |
| 90 | +#### WebApi Interface Detail: |
| 91 | +##### Path: `/api/list` |
| 92 | +##### Method: `GET` |
| 93 | +##### Args: `Nothing` |
| 94 | +##### Response Format: `Json` |
| 95 | +##### Json Args: |
| 96 | +###### `code` `int` `response code` |
| 97 | +###### `content` `dict` `dict of list, included whitelist and blacklist` |
| 98 | +##### Content Dict(content): |
| 99 | +###### `white` `list` `songs list of whitelist` |
| 100 | +###### `black` `list` `songs list of blacklist` |
| 101 | +##### List of Songs Args: |
| 102 | +###### `pid` `int` `platform id` |
| 103 | +###### `id` `int` `song id(platform)` |
| 104 | +###### `name` `string` `name of song` |
| 105 | +###### `artists` `list` `list of artists` |
| 106 | +###### `album` `dict` `album of this song` |
| 107 | +##### List of Artists Args: |
| 108 | +###### `id` `int` `artist id(platform)` |
| 109 | +###### `name` `string` `name of this artist` |
| 110 | +###### `cover` `string` `image url of this aritist` |
| 111 | +##### Album Args: |
| 112 | +###### `id` `int` `album id(platform)` |
| 113 | +###### `name` `string` `name of this album` |
| 114 | +###### `cover` `string` `image url of this album` |
| 115 | + |
| 116 | +### Confirm Page |
| 117 | +#### The confirm page use the path "/confirm" |
| 118 | +#### This page only use for the twice confirm |
| 119 | +#### Located from the search page |
| 120 | +#### Read the parameter from url on front code (Javascript) |
| 121 | +#### Get Parameter: |
| 122 | +##### `platform` `int` `platform id` |
| 123 | +##### `id` `int` `id of the song` |
| 124 | +#### Then use the id and platform id to requests the song detail |
| 125 | +#### WebApi Interface Detail: |
| 126 | +##### Path: `/api/detail` |
| 127 | +##### Method: `POST` |
| 128 | +##### Args: |
| 129 | +###### `platform` `int` `id of the platform` |
| 130 | +###### `id` `int` `id of the song` |
| 131 | +###### `token` `string` `user token` |
| 132 | +##### Response Format: `Json` |
| 133 | +##### Json Args: |
| 134 | +###### `code` `int` `response code` |
| 135 | +###### `content` `list` `list of songs` |
| 136 | +##### List of Songs Args(content): |
| 137 | +###### `pid` `int` `platform id` |
| 138 | +###### `id` `int` `song id(platform)` |
| 139 | +###### `name` `string` `name of song` |
| 140 | +###### `artists` `list` `list of artists` |
| 141 | +###### `album` `dict` `album of this song` |
| 142 | +###### `url` `string` `the media url of this song (source platform or system cache)` |
| 143 | +##### List of Artists Args: |
| 144 | +###### `id` `int` `artist id(platform)` |
| 145 | +###### `name` `string` `name of this artist` |
| 146 | +###### `cover` `string` `image url of this aritist` |
| 147 | +##### Album Args: |
| 148 | +###### `id` `int` `album id(platform)` |
| 149 | +###### `name` `string` `name of this album` |
| 150 | +###### `cover` `string` `image url of this album` |
| 151 | +#### After user clicking the confirm button, send request to this interface |
| 152 | +#### WebApi Interface Detail: |
| 153 | +##### Path: `/api/detail` |
| 154 | +##### Method: `POST` |
| 155 | +##### Args: |
| 156 | +###### `platform` `int` `id of the platform` |
| 157 | +###### `id` `int` `id of the song` |
| 158 | +###### `date` `string` `YYYY-MM-DD` |
| 159 | +###### `token` `string` `user token` |
| 160 | +##### Response Format: `Json` |
| 161 | +##### Json Args: |
| 162 | +###### `code` `int` `response code` |
| 163 | + |
| 164 | +## Back (Admin) |
| 165 | + |
| 166 | +### Access Page |
0 commit comments