Skip to content

Commit 9ff258d

Browse files
committed
wip & poc phase
1 parent 280010d commit 9ff258d

171 files changed

Lines changed: 41541 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bruno/AppleMusic/aaa.bru

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
meta {
2+
name: aaa
3+
type: http
4+
seq: 3
5+
}
6+
7+
get {
8+
url: https://amp-api-edge.music.apple.com/v1/test
9+
body: none
10+
auth: inherit
11+
}
12+
13+
settings {
14+
encodeUrl: true
15+
}

.bruno/AppleMusic/bruno.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"version": "1",
3+
"name": "AppleMusic",
4+
"type": "collection",
5+
"ignore": [
6+
"node_modules",
7+
".git"
8+
]
9+
}

.bruno/AppleMusic/get base js.bru

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
meta {
2+
name: get base js
3+
type: http
4+
seq: 3
5+
}
6+
7+
get {
8+
url: https://music.apple.com/
9+
body: none
10+
auth: inherit
11+
}
12+
13+
settings {
14+
encodeUrl: true
15+
}

.bruno/AppleMusic/get base.bru

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
meta {
2+
name: get base
3+
type: http
4+
seq: 1
5+
}
6+
7+
get {
8+
url: https://music.apple.com/
9+
body: none
10+
auth: inherit
11+
}
12+
13+
settings {
14+
encodeUrl: true
15+
}

bun.lock

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export default [
1010
ignores: ['.next/**', 'node_modules/**', 'dist/**', 'coverage/**', 'scripts/**'],
1111
},
1212
// Security
13-
//@ts-expect-error eslint-plugin-security has no types // not the "correct" ones at least
1413
securityPlugin.configs.recommended,
1514
{
1615
files: ['**/*.ts'],

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"description": "Apple Music API",
1111
"scripts": {
1212
"build": "rm -rf ./dist && tsc --build --verbose --diagnostics && tsc-alias",
13-
"test": "vitest run",
13+
"test": "vitest run --coverage",
14+
"dtest": "bun run src/test.ts",
1415
"check-types": "tsc --noEmit",
1516
"lint": "eslint . --ext .ts"
1617
},
@@ -40,12 +41,15 @@
4041
"applemusic"
4142
],
4243
"dependencies": {
43-
"axios": "^1.11.0"
44+
"axios": "^1.11.0",
45+
"tough-cookie": "^6.0.0"
4446
},
4547
"devDependencies": {
4648
"@eslint/js": "^9.26.0",
4749
"@types/bun": "latest",
50+
"@types/eslint-plugin-security": "^3.0.0",
4851
"@types/supertest": "^6.0.3",
52+
"@vitest/coverage-v8": "3.2.4",
4953
"eslint": "^9.26.0",
5054
"eslint-plugin-security": "^3.0.1",
5155
"eslint-plugin-unicorn": "^61.0.2",
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: "Albums.Attributes"
3+
source: "https://developer.apple.com/documentation/applemusicapi/albums/attributes-data.dictionary"
4+
author:
5+
- "[[Apple Developer Documentation]]"
6+
published:
7+
created: 2025-10-02
8+
description: "The attributes for an album resource."
9+
tags:
10+
- "clippings"
11+
---
12+
[Skip Navigation](https://developer.apple.com/documentation/applemusicapi/albums/#app-main)
13+
14+
The attributes for an album resource.
15+
16+
```
17+
object Albums.Attributes
18+
```
19+
20+
## Properties
21+
22+
`artistName`
23+
24+
(Required)
25+
26+
The name of the primary artist associated with the album.
27+
28+
`artistUrl`
29+
30+
**(Extended)** The URL of the artist for this content.
31+
32+
`artwork`
33+
34+
(Required)
35+
36+
The artwork for the album.
37+
38+
`audioVariants`
39+
40+
**(Extended)** Indicates the specific audio variant for the album.
41+
42+
`contentRating`
43+
44+
The Recording Industry Association of America (RIAA) rating of the content. No value means no rating.
45+
46+
`editorialNotes`
47+
48+
The notes about the album that appear in the iTunes Store.
49+
50+
`genreNames`
51+
52+
(Required)
53+
54+
The names of the genres associated with the album.
55+
56+
`inFavorites`
57+
58+
`isCompilation`
59+
60+
(Required)
61+
62+
Indicates whether the album is marked as a compilation. If `true`, the album is a compilation; otherwise, it’s not.
63+
64+
`isComplete`
65+
66+
(Required)
67+
68+
Indicates whether the album is complete. If `true`, the album is complete; otherwise, it’s not. An album is complete if it contains all its tracks and songs.
69+
70+
`isMasteredForItunes`
71+
72+
(Required)
73+
74+
Indicates whether the response delivered the album as an [Apple Digital Master](https://www.apple.com/itunes/mastered-for-itunes/).
75+
76+
`isSingle`
77+
78+
(Required)
79+
80+
Indicates whether the album contains a single song.
81+
82+
`name`
83+
84+
(Required)
85+
86+
The localized name of the album.
87+
88+
`playParams`
89+
90+
When present, this attribute indicates that one or more tracks on the album are available to play with an Apple Music subscription. The value map may be used to initiate playback of available tracks on the album.
91+
92+
`recordLabel`
93+
94+
The name of the record label for the album.
95+
96+
`releaseDate`
97+
98+
The release date of the album, when known, in YYYY-MM-DD or YYYY format. Prerelease content may have an expected release date in the future.
99+
100+
`trackCount`
101+
102+
(Required)
103+
104+
The number of tracks for the album.
105+
106+
`upc`
107+
108+
The Universal Product Code for the album.
109+
110+
`url`
111+
112+
(Required)
113+
114+
The URL for sharing the album in Apple Music.
115+
116+
Current page is Albums.Attributes
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: "Albums.Relationships.AlbumsArtistsRelationship"
3+
source: "https://developer.apple.com/documentation/applemusicapi/albums/relationships-data.dictionary/albumsartistsrelationship"
4+
author:
5+
- "[[Apple Developer Documentation]]"
6+
published:
7+
created: 2025-10-02
8+
description: "A relationship from the album to its artists."
9+
tags:
10+
- "clippings"
11+
---
12+
[Skip Navigation](https://developer.apple.com/documentation/applemusicapi/albums/relationships-data.dictionary/#app-main)
13+
14+
- [Apple Music API](https://developer.apple.com/documentation/applemusicapi)
15+
- [Albums](https://developer.apple.com/documentation/applemusicapi/albums)
16+
- [Albums.Relationships](https://developer.apple.com/documentation/applemusicapi/albums/relationships-data.dictionary)
17+
- Albums.Relationships.AlbumsArtistsRelationship
18+
19+
Object
20+
21+
A relationship from the album to its artists.
22+
23+
```
24+
object Albums.Relationships.AlbumsArtistsRelationship
25+
```
26+
27+
## Properties
28+
29+
`href`
30+
31+
`string`
32+
33+
The relative location to fetch the relationship directly.
34+
35+
`next`
36+
37+
`string`
38+
39+
The relative location to request the next page of resources in the collection, if additional resources are available for fetching.
40+
41+
`data`
42+
43+
``[[`Artists`](https://developer.apple.com/documentation/applemusicapi/artists)]``
44+
45+
(Required)
46+
47+
The artists for the album.
48+
49+
Current page is Albums.Relationships.AlbumsArtistsRelationship
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: "Albums.Relationships.AlbumsGenresRelationship"
3+
source: "https://developer.apple.com/documentation/applemusicapi/albums/relationships-data.dictionary/albumsgenresrelationship"
4+
author:
5+
- "[[Apple Developer Documentation]]"
6+
published:
7+
created: 2025-10-02
8+
description: "A relationship from the album to its genres."
9+
tags:
10+
- "clippings"
11+
---
12+
[Skip Navigation](https://developer.apple.com/documentation/applemusicapi/albums/relationships-data.dictionary/#app-main)
13+
14+
- [Apple Music API](https://developer.apple.com/documentation/applemusicapi)
15+
- [Albums](https://developer.apple.com/documentation/applemusicapi/albums)
16+
- [Albums.Relationships](https://developer.apple.com/documentation/applemusicapi/albums/relationships-data.dictionary)
17+
- Albums.Relationships.AlbumsGenresRelationship
18+
19+
Object
20+
21+
A relationship from the album to its genres.
22+
23+
```
24+
object Albums.Relationships.AlbumsGenresRelationship
25+
```
26+
27+
## Properties
28+
29+
`href`
30+
31+
`string`
32+
33+
The relative location to fetch the relationship directly.
34+
35+
`next`
36+
37+
`string`
38+
39+
The relative location to request the next page of resources in the collection, if additional resources are available for fetching.
40+
41+
`data`
42+
43+
``[[`Genres`](https://developer.apple.com/documentation/applemusicapi/genres)]``
44+
45+
(Required)
46+
47+
The album’s associated genre.
48+
49+
Current page is Albums.Relationships.AlbumsGenresRelationship

0 commit comments

Comments
 (0)