Skip to content

Commit 191e16a

Browse files
authored
Update README.md
1 parent dca6dce commit 191e16a

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ The following projects can gather the stats:
1010
You can also make your own project that will do that. See the format specification below.
1111

1212
## Data format
13-
This is an example stat file:
13+
### Unprocessed stats JSON (the stats file)
14+
Ungroupped unprocessed stats. Made to be human readable and for quick modification.
1415

1516
```json
1617
{
@@ -24,3 +25,33 @@ This is an example stat file:
2425
]
2526
}
2627
```
28+
29+
- `formatVersion`: (number) Numeric version of the file structure. Made for distinguishing the versions and converting them in case the format changes in future.
30+
- `songs`: (SongData[]) An array of songs
31+
> SongData
32+
> - `title`: (string) Title of the song
33+
> - `artist`: (string) Name of the artist
34+
> - `totalPlays`: (number) Total number of plays
35+
36+
### Processed stats JSON (encoded in URL as Base64)
37+
Processed, almost ready to display stats. Meant to take less space when more data is present.
38+
Artists and songs that don't qualify for display are not included.
39+
40+
- `artists`: (ArtistData[]) Array of artists
41+
> ArtistData
42+
> - `name`: (string) Name of the artist
43+
> - `totalPlays`: (number) Number
44+
- - `songs`: (StrippedSongData[]) Array of songs
45+
> StrippedSongData
46+
> - `title`: (string) Title of the song
47+
> - `artist`: (number) Index of the song's artist
48+
> - `totalPlays`: (number) Total amount of plays
49+
- `songCount`: (number) Total number of songs a user has listened to
50+
- `artistCount`: (number) Total number of artists a user has listened to
51+
52+
### URL format
53+
`https://wolfyxon.github.io/SongWrap/?s=<base64 processed stats JSON>`
54+
55+
Example:
56+
57+
https://wolfyxon.github.io/SongWrap/?s=eyJzb25ncyI6W3sidGl0bGUiOiJCZWhvbGQgdGhlIHNrZWxldG9uIiwiYXJ0aXN0IjoiS2Fyb2xldXNQTCIsInRvdGFsUGxheXMiOjQyfSx7InRpdGxlIjoiR2lmdGlnIiwiYXJ0aXN0IjoiUmFtbXN0ZWluIiwidG90YWxQbGF5cyI6MzV9LHsidGl0bGUiOiJBbiBBYnNlbmNlIiwiYXJ0aXN0IjoiSGVhdmVuIFBpZXJjZSBIZXIiLCJ0b3RhbFBsYXlzIjozMH0seyJ0aXRsZSI6IkJJRyBTSE9UIiwiYXJ0aXN0IjoiVG9ieSBGb3giLCJ0b3RhbFBsYXlzIjoxN31dLCJhcnRpc3RzIjpbeyJuYW1lIjoiS2Fyb2xldXNQTCIsInRvdGFsUGxheXMiOjU3fSx7Im5hbWUiOiJSYW1tc3RlaW4iLCJ0b3RhbFBsYXlzIjo1N30seyJuYW1lIjoiSGVhdmVuIFBpZXJjZSBIZXIiLCJ0b3RhbFBsYXlzIjo0Nn1dLCJ0b3BBcnRpc3RzIjpbMCwxLDJdLCJ0b3BTb25ncyI6WzAsMSwyLDNdLCJzb25nQ291bnQiOjIyLCJhcnRpc3RDb3VudCI6MTR9

0 commit comments

Comments
 (0)