lastfm-nodejs-client 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +14 -2
  2. package/dist/cjs/auth.d.ts +12 -0
  3. package/dist/{auth.js → cjs/auth.js} +11 -11
  4. package/dist/cjs/chart/topArtists.d.ts +2 -0
  5. package/dist/cjs/chart/topArtists.js +13 -0
  6. package/dist/cjs/chart/topTags.d.ts +2 -0
  7. package/dist/cjs/chart/topTags.js +13 -0
  8. package/dist/cjs/chart/topTracks.d.ts +2 -0
  9. package/dist/cjs/chart/topTracks.js +13 -0
  10. package/dist/{config.d.ts → cjs/config.d.ts} +0 -1
  11. package/dist/{config.js → cjs/config.js} +0 -1
  12. package/dist/cjs/createOptions.d.ts +7 -0
  13. package/dist/{createOptions.js → cjs/createOptions.js} +2 -1
  14. package/dist/{getInfo.d.ts → cjs/getInfo.d.ts} +1 -2
  15. package/dist/{getInfo.js → cjs/getInfo.js} +2 -2
  16. package/dist/{getLovedTracks.d.ts → cjs/getLovedTracks.d.ts} +1 -2
  17. package/dist/{getLovedTracks.js → cjs/getLovedTracks.js} +2 -2
  18. package/dist/{getRecentTracks.d.ts → cjs/getRecentTracks.d.ts} +1 -2
  19. package/dist/{getRecentTracks.js → cjs/getRecentTracks.js} +2 -2
  20. package/dist/{getTopAlbums.d.ts → cjs/getTopAlbums.d.ts} +1 -2
  21. package/dist/{getTopAlbums.js → cjs/getTopAlbums.js} +2 -2
  22. package/dist/{getTopArtists.d.ts → cjs/getTopArtists.d.ts} +1 -2
  23. package/dist/{getTopArtists.js → cjs/getTopArtists.js} +2 -2
  24. package/dist/{getTopTracks.d.ts → cjs/getTopTracks.d.ts} +1 -2
  25. package/dist/{getTopTracks.js → cjs/getTopTracks.js} +2 -2
  26. package/dist/{getWeeklyAlbumChart.d.ts → cjs/getWeeklyAlbumChart.d.ts} +1 -2
  27. package/dist/{getWeeklyAlbumChart.js → cjs/getWeeklyAlbumChart.js} +2 -2
  28. package/dist/{getWeeklyArtistChart.d.ts → cjs/getWeeklyArtistChart.d.ts} +1 -2
  29. package/dist/{getWeeklyArtistChart.js → cjs/getWeeklyArtistChart.js} +2 -2
  30. package/dist/{getWeeklyChartList.d.ts → cjs/getWeeklyChartList.d.ts} +1 -2
  31. package/dist/{getWeeklyChartList.js → cjs/getWeeklyChartList.js} +2 -2
  32. package/dist/{getWeeklyTrackChart.d.ts → cjs/getWeeklyTrackChart.d.ts} +1 -2
  33. package/dist/{getWeeklyTrackChart.js → cjs/getWeeklyTrackChart.js} +2 -2
  34. package/dist/{index.d.ts → cjs/index.d.ts} +14 -3
  35. package/dist/cjs/index.js +41 -0
  36. package/dist/{method.d.ts → cjs/method.d.ts} +11 -1
  37. package/dist/{method.js → cjs/method.js} +5 -2
  38. package/dist/cjs/package.json +3 -0
  39. package/dist/{request.d.ts → cjs/request.d.ts} +0 -1
  40. package/dist/{request.js → cjs/request.js} +7 -15
  41. package/dist/mjs/auth.d.ts +12 -0
  42. package/dist/mjs/auth.js +16 -0
  43. package/dist/mjs/chart/topArtists.d.ts +2 -0
  44. package/dist/mjs/chart/topArtists.js +6 -0
  45. package/dist/mjs/chart/topTags.d.ts +2 -0
  46. package/dist/mjs/chart/topTags.js +6 -0
  47. package/dist/mjs/chart/topTracks.d.ts +2 -0
  48. package/dist/mjs/chart/topTracks.js +6 -0
  49. package/dist/mjs/config.d.ts +20 -0
  50. package/dist/mjs/config.js +22 -0
  51. package/dist/mjs/createOptions.d.ts +7 -0
  52. package/dist/mjs/createOptions.js +9 -0
  53. package/dist/mjs/getInfo.d.ts +8 -0
  54. package/dist/mjs/getInfo.js +12 -0
  55. package/dist/mjs/getLovedTracks.d.ts +8 -0
  56. package/dist/mjs/getLovedTracks.js +12 -0
  57. package/dist/mjs/getRecentTracks.d.ts +8 -0
  58. package/dist/mjs/getRecentTracks.js +12 -0
  59. package/dist/mjs/getTopAlbums.d.ts +8 -0
  60. package/dist/mjs/getTopAlbums.js +12 -0
  61. package/dist/mjs/getTopArtists.d.ts +8 -0
  62. package/dist/mjs/getTopArtists.js +12 -0
  63. package/dist/mjs/getTopTracks.d.ts +8 -0
  64. package/dist/mjs/getTopTracks.js +12 -0
  65. package/dist/mjs/getWeeklyAlbumChart.d.ts +8 -0
  66. package/dist/mjs/getWeeklyAlbumChart.js +12 -0
  67. package/dist/mjs/getWeeklyArtistChart.d.ts +8 -0
  68. package/dist/mjs/getWeeklyArtistChart.js +12 -0
  69. package/dist/mjs/getWeeklyChartList.d.ts +8 -0
  70. package/dist/mjs/getWeeklyChartList.js +12 -0
  71. package/dist/mjs/getWeeklyTrackChart.d.ts +8 -0
  72. package/dist/mjs/getWeeklyTrackChart.js +12 -0
  73. package/dist/mjs/index.d.ts +63 -0
  74. package/{src/index.ts → dist/mjs/index.js} +25 -18
  75. package/dist/mjs/method.d.ts +43 -0
  76. package/dist/mjs/method.js +20 -0
  77. package/dist/mjs/package.json +3 -0
  78. package/dist/mjs/request.d.ts +8 -0
  79. package/dist/mjs/request.js +119 -0
  80. package/lastfm-nodejs-client/package.json +7 -0
  81. package/package.json +41 -13
  82. package/.env.example +0 -6
  83. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
  84. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  85. package/.github/dependabot.yml +0 -11
  86. package/.github/workflows/codeql.yml +0 -74
  87. package/.github/workflows/playwright.yml +0 -36
  88. package/.nvmrc +0 -1
  89. package/.prettierrc.yaml +0 -6
  90. package/@types/index.d.ts +0 -289
  91. package/CHANGELOG.md +0 -108
  92. package/CODE_OF_CONDUCT.md +0 -128
  93. package/CONTRIBUTING.md +0 -9
  94. package/SECURITY.md +0 -13
  95. package/dist/auth.d.ts +0 -13
  96. package/dist/auth.d.ts.map +0 -1
  97. package/dist/config.d.ts.map +0 -1
  98. package/dist/createOptions.d.ts +0 -7
  99. package/dist/createOptions.d.ts.map +0 -1
  100. package/dist/getInfo.d.ts.map +0 -1
  101. package/dist/getLovedTracks.d.ts.map +0 -1
  102. package/dist/getRecentTracks.d.ts.map +0 -1
  103. package/dist/getTopAlbums.d.ts.map +0 -1
  104. package/dist/getTopArtists.d.ts.map +0 -1
  105. package/dist/getTopTracks.d.ts.map +0 -1
  106. package/dist/getWeeklyAlbumChart.d.ts.map +0 -1
  107. package/dist/getWeeklyArtistChart.d.ts.map +0 -1
  108. package/dist/getWeeklyChartList.d.ts.map +0 -1
  109. package/dist/getWeeklyTrackChart.d.ts.map +0 -1
  110. package/dist/index.d.ts.map +0 -1
  111. package/dist/index.js +0 -31
  112. package/dist/method.d.ts.map +0 -1
  113. package/dist/request.d.ts.map +0 -1
  114. package/playwright.config.ts +0 -37
  115. package/src/auth.ts +0 -23
  116. package/src/config.ts +0 -34
  117. package/src/createOptions.ts +0 -12
  118. package/src/getInfo.ts +0 -17
  119. package/src/getLovedTracks.ts +0 -19
  120. package/src/getRecentTracks.ts +0 -19
  121. package/src/getTopAlbums.ts +0 -19
  122. package/src/getTopArtists.ts +0 -19
  123. package/src/getTopTracks.ts +0 -19
  124. package/src/getWeeklyAlbumChart.ts +0 -19
  125. package/src/getWeeklyArtistChart.ts +0 -19
  126. package/src/getWeeklyChartList.ts +0 -19
  127. package/src/getWeeklyTrackChart.ts +0 -20
  128. package/src/method.ts +0 -33
  129. package/src/request.ts +0 -133
  130. package/tests/env.spec.ts +0 -21
  131. package/tsconfig.dev.json +0 -7
  132. package/tsconfig.json +0 -104
package/package.json CHANGED
@@ -1,8 +1,36 @@
1
1
  {
2
2
  "name": "lastfm-nodejs-client",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "A NodeJS wrapper client for LastFm API. Fetching public data by username using the LastFm public API",
5
- "main": "./dist",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/mjs/index.js",
7
+ "types": "dist/mjs/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "lastfm-nodejs-client"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/mjs/index.js",
15
+ "require": "./dist/cjs/index.js",
16
+ "types": "./dist/mjs/index.d.ts"
17
+ },
18
+ "./lastfm-nodejs-client": {
19
+ "import": "./dist/mjs/index.js",
20
+ "require": "./dist/cjs/index.js",
21
+ "types": "./dist/mjs/index.d.ts"
22
+ }
23
+ },
24
+ "scripts": {
25
+ "build": "rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && bash ./generate-package-json-files.sh",
26
+ "lint": "eslint src",
27
+ "lint-fix": "eslint src --fix",
28
+ "prepare": "npm run build",
29
+ "_prepublishOnly": "npm test && npm run lint",
30
+ "clean": "rimraf dist",
31
+ "publish": "npm run build && npm publish --access public",
32
+ "test": "npx playwright test --reporter=list"
33
+ },
6
34
  "keywords": [
7
35
  "client",
8
36
  "lastFm",
@@ -18,11 +46,17 @@
18
46
  "dependencies": {
19
47
  "cross-fetch": "^4.0.0",
20
48
  "dotenv": "^16.3.1",
21
- "rimraf": "^5.0.1"
49
+ "rimraf": "^5.0.5"
22
50
  },
23
51
  "devDependencies": {
24
- "@playwright/test": "^1.38.0",
25
- "@types/node": "^20.6.2",
52
+ "@playwright/test": "^1.38.1",
53
+ "@types/node": "^20.7.1",
54
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
55
+ "eslint": "^8.0.1",
56
+ "eslint-config-standard-with-typescript": "^39.1.0",
57
+ "eslint-plugin-import": "^2.25.2",
58
+ "eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
59
+ "eslint-plugin-promise": "^6.0.0",
26
60
  "typescript": "^5.2.2"
27
61
  },
28
62
  "repository": {
@@ -32,11 +66,5 @@
32
66
  "bugs": {
33
67
  "url": "https://github.com/mannuelf/lastfm-nodejs-client/issues"
34
68
  },
35
- "homepage": "https://github.com/mannuelf/lastfm-nodejs-client#readme",
36
- "scripts": {
37
- "build": "rimraf dist && tsc",
38
- "clean": "rimraf dist",
39
- "dev": "npm run clean && tsc --watch --project tsconfig.dev.json",
40
- "test": "npx playwright test --reporter=list"
41
- }
42
- }
69
+ "homepage": "https://github.com/mannuelf/lastfm-nodejs-client#readme"
70
+ }
package/.env.example DELETED
@@ -1,6 +0,0 @@
1
- LASTFM_API_BASE_URL=https://ws.audioscrobbler.com/2.0/
2
- LASTFM_API_KEY=f7177932c78b9723d54e617d0d5695ee
3
- LASTFM_APPNAME=music-wall
4
- LASTFM_SHARED_SECRET=bcffbbc0ba4af16fc00415c94b138c74
5
- LASTFM_USER=mannuelf
6
- LASTFM_REGISTERTO=mannuelf
@@ -1,38 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Describe the bug**
11
- A clear and concise description of what the bug is.
12
-
13
- **To Reproduce**
14
- Steps to reproduce the behavior:
15
- 1. Go to '...'
16
- 2. Click on '....'
17
- 3. Scroll down to '....'
18
- 4. See error
19
-
20
- **Expected behavior**
21
- A clear and concise description of what you expected to happen.
22
-
23
- **Screenshots**
24
- If applicable, add screenshots to help explain your problem.
25
-
26
- **Desktop (please complete the following information):**
27
- - OS: [e.g. iOS]
28
- - Browser [e.g. chrome, safari]
29
- - Version [e.g. 22]
30
-
31
- **Smartphone (please complete the following information):**
32
- - Device: [e.g. iPhone6]
33
- - OS: [e.g. iOS8.1]
34
- - Browser [e.g. stock browser, safari]
35
- - Version [e.g. 22]
36
-
37
- **Additional context**
38
- Add any other context about the problem here.
@@ -1,20 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Is your feature request related to a problem? Please describe.**
11
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
-
13
- **Describe the solution you'd like**
14
- A clear and concise description of what you want to happen.
15
-
16
- **Describe alternatives you've considered**
17
- A clear and concise description of any alternative solutions or features you've considered.
18
-
19
- **Additional context**
20
- Add any other context or screenshots about the feature request here.
@@ -1,11 +0,0 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "npm"
9
- directory: "/"
10
- schedule:
11
- interval: "weekly"
@@ -1,74 +0,0 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: "CodeQL"
13
-
14
- on:
15
- push:
16
- branches: [ "main" ]
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: [ "main" ]
20
- schedule:
21
- - cron: '29 13 * * 4'
22
-
23
- jobs:
24
- analyze:
25
- name: Analyze
26
- runs-on: ubuntu-latest
27
- permissions:
28
- actions: read
29
- contents: read
30
- security-events: write
31
-
32
- strategy:
33
- fail-fast: false
34
- matrix:
35
- language: [ 'javascript' ]
36
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
-
39
- steps:
40
- - name: Checkout repository
41
- uses: actions/checkout@v3
42
-
43
- # Initializes the CodeQL tools for scanning.
44
- - name: Initialize CodeQL
45
- uses: github/codeql-action/init@v2
46
- with:
47
- languages: ${{ matrix.language }}
48
- # If you wish to specify custom queries, you can do so here or in a config file.
49
- # By default, queries listed here will override any specified in a config file.
50
- # Prefix the list here with "+" to use these queries and those in the config file.
51
-
52
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
- # queries: security-extended,security-and-quality
54
-
55
-
56
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
57
- # If this step fails, then you should remove it and run the build manually (see below)
58
- - name: Autobuild
59
- uses: github/codeql-action/autobuild@v2
60
-
61
- # ℹ️ Command-line programs to run using the OS shell.
62
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
-
64
- # If the Autobuild fails above, remove it and uncomment the following three lines.
65
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66
-
67
- # - run: |
68
- # echo "Run, Build Application using script"
69
- # ./location_of_script_within_repo/buildscript.sh
70
-
71
- - name: Perform CodeQL Analysis
72
- uses: github/codeql-action/analyze@v2
73
- with:
74
- category: "/language:${{matrix.language}}"
@@ -1,36 +0,0 @@
1
- name: Playwright Tests
2
- on:
3
- push:
4
- branches: [main, master]
5
- pull_request:
6
- branches: [main, master]
7
- jobs:
8
- test:
9
- timeout-minutes: 60
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v3
13
- - uses: actions/setup-node@v3
14
- with:
15
- node-version: 16
16
- - uses: pnpm/action-setup@v2
17
- with:
18
- version: 7.14.1
19
- - name: Install dependencies
20
- run: pnpm install
21
- - name: Install Playwright Browsers
22
- run: npx playwright install --with-deps
23
- - name: Install @playwright/test package
24
- run: pnpm add -D @playwright/test
25
- - name: Creates environment variables
26
- run: |
27
- echo "LASTFM_API_BASE_URL: https://ws.audioscrobbler.com/2.0/"
28
- echo "LASTFM_API_KEY: abcdefghijklmnopqrstuvxyz"
29
- - name: Run Playwright tests
30
- run: pnpm dlx playwright test
31
- - uses: actions/upload-artifact@v2
32
- if: always()
33
- with:
34
- name: playwright-report
35
- path: playwright-report/
36
- retention-days: 30
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v20
package/.prettierrc.yaml DELETED
@@ -1,6 +0,0 @@
1
- semi: true
2
- trailingComma: all
3
- singleQuote: true
4
- jsxSingleQuote: true
5
- printWidth: 100
6
- tabWidth: 2
package/@types/index.d.ts DELETED
@@ -1,289 +0,0 @@
1
- export interface AuthResponse {
2
- token: string;
3
- }
4
-
5
- export interface LovedTracksResponse {
6
- lovedtracks: LovedTracks;
7
- }
8
-
9
- export interface LovedTracks {
10
- track: Track[];
11
- '@attr': AttrNowPlaying;
12
- }
13
- export interface TopAlbumsResponse {
14
- topalbums: TopAlbums;
15
- }
16
-
17
- export interface TopTrackResponse {
18
- toptracks: TopTracks;
19
- }
20
-
21
- export interface TopTracks {
22
- track: Track[];
23
- '@attr': AttrLimit;
24
- }
25
-
26
- export interface UserResponse {
27
- user: User;
28
- }
29
-
30
- export interface RecentTracksResponse {
31
- recenttracks: RecentTracks;
32
- }
33
-
34
- export interface RecentTracks {
35
- track: Track[];
36
- '@attr': AttrLimit;
37
- }
38
-
39
- export interface LoveTracksResponse {
40
- lovedtracks: LovedTracks;
41
- }
42
-
43
- export interface LovedTracks {
44
- track: Track[];
45
- '@attr': AttrNowPlaying;
46
- }
47
- export interface FriendsResponse {
48
- friends: Friends;
49
- }
50
-
51
- export interface Friends {
52
- '@attr': AttrNowPlaying;
53
- user: User[];
54
- }
55
-
56
- export interface TopArtistsResponse {
57
- topartists: TopArtists;
58
- }
59
-
60
- export interface TopArtists {
61
- artist: Artist[];
62
- '@attr': AttrLimit;
63
- }
64
-
65
- export interface WeeklyArtistChartResponse {
66
- weeklyartistchart: WeeklyArtistChart;
67
- }
68
-
69
- export interface WeeklyArtistChart {
70
- artist: Artist[];
71
- '@attr': AttrLimit;
72
- }
73
-
74
- export interface WeeklyAlbumChartResponse {
75
- weeklyalbumchart: WeeklyAlbumChart;
76
- }
77
-
78
- export interface WeeklyAlbumChart {
79
- album: WeeklyAlbum[];
80
- '@attr': WeeklyalbumChartAttr;
81
- }
82
-
83
- export interface WeeklyAlbum {
84
- artist: {
85
- mbid: string;
86
- '#text': string;
87
- };
88
- mbid: string;
89
- url: string;
90
- name: string;
91
- '@attr': { rank: string };
92
- playcount: string;
93
- image?: string;
94
- };
95
-
96
- export interface WeeklyalbumChartAttr {
97
- from: string;
98
- to: string;
99
- user: string;
100
- }
101
-
102
- export interface AlbumAttr {
103
- rank: string;
104
- }
105
-
106
- export type Artist = {
107
- '@attr': {
108
- rank: number;
109
- };
110
- cover: ArtistImage;
111
- image?: Image[];
112
- mbid: string;
113
- name: string;
114
- playcount: number;
115
- streamable: number;
116
- url: string;
117
- '#text': string;
118
- };
119
-
120
- export interface Attribs {
121
- page: number;
122
- perPage: number;
123
- user: string;
124
- total: number;
125
- totalPages: number;
126
- }
127
-
128
- export interface ArtistImage {
129
- name: string;
130
- photo: string;
131
- attribution: string;
132
- playcount: number;
133
- }
134
-
135
- export interface Album extends Track {
136
- album: Album;
137
- artist: Artist;
138
- name: string;
139
- url: string
140
- };
141
-
142
- export interface AttrNowPlaying {
143
- nowplaying: string;
144
- }
145
-
146
- export interface Date {
147
- uts: string;
148
- '#text': string;
149
- }
150
-
151
- export interface Track {
152
- '@attr'?: AttrRank;
153
- album: Album;
154
- artist: Artist;
155
- date?: Date;
156
- duration?: string;
157
- image?: Image[];
158
- mbid: string;
159
- name: string;
160
- playcount?: string;
161
- streamable?: string;
162
- url: string;
163
- }
164
-
165
- export interface AttrLimit {
166
- user: string;
167
- totalPages: string;
168
- page: string;
169
- perPage: string;
170
- total: string;
171
- }
172
-
173
- export interface RecentTracks {
174
- track: Track[];
175
- '@attr': AttrLimit;
176
- }
177
-
178
- export interface Image {
179
- size: string;
180
- '#text': string;
181
- }
182
-
183
- export interface Registered {
184
- unixtime: string;
185
- '#text': number;
186
- }
187
-
188
- export interface User {
189
- name: string;
190
- age: string;
191
- subscriber: string;
192
- realname: string;
193
- bootstrap: string;
194
- playcount: string;
195
- artist_count: string;
196
- playlists: string;
197
- track_count: string;
198
- album_count: string;
199
- image: Image[];
200
- registered: Registered;
201
- country: string;
202
- gender: string;
203
- url: string;
204
- type: string;
205
- }
206
-
207
- export interface TopAlbums {
208
- album: Album[];
209
- '@attr': AttrLimit;
210
- }
211
-
212
- export interface WeeklyArtistChartResponse {
213
- weeklyartistchart: WeeklyArtistChart;
214
- }
215
-
216
- export interface WeeklyArtistChart {
217
- artist: Artist[];
218
- '@attr': AttrLimit;
219
- }
220
-
221
- export interface AttrRank {
222
- rank?: string;
223
- }
224
-
225
- export interface AttrLimit {
226
- from: string;
227
- user: string;
228
- to: string;
229
- }
230
-
231
- export interface WeeklyChartListResponse {
232
- weeklychartlist: WeeklyChartList;
233
- }
234
-
235
- export interface WeeklyChartList {
236
- chart: WeeklyChartListChart[];
237
- '@attr': WeeklyChartListAttr;
238
- }
239
-
240
- export interface WeeklyChartListChart {
241
- '#text': string;
242
- from: string;
243
- to: string;
244
- }
245
-
246
- export interface WeeklyChartListAttr {
247
- user: string;
248
- }
249
-
250
- export interface WeeklyTrackChartResponse {
251
- weeklytrackchart: WeeklyTrackChart;
252
- }
253
-
254
- export interface WeeklyTrackChart {
255
- track: Track[];
256
- '@attr': AttrLimit;
257
- }
258
-
259
- export interface WeeklyTrackChartTrack {
260
- artist: WeeklyTrackChartArtist;
261
- image: Image[];
262
- mbid: string;
263
- url: string;
264
- name: string;
265
- '@attr': AttrNowPlaying;
266
- playcount: string;
267
- }
268
-
269
- export interface WeeklyTrackChartArtist {
270
- mbid: string;
271
- '#text': string;
272
- }
273
-
274
- export enum ErrorResponse {
275
- InvalidService = 2,
276
- InvalidMethod = 3,
277
- AuthenticationFailed = 4,
278
- InvalidFormat = 5,
279
- InvalidParameters = 6,
280
- InvalidResource = 7,
281
- OperationFailed = 8,
282
- InvalidSessionKey = 9,
283
- InvalidAPIKey = 10,
284
- ServiceOffline = 11,
285
- InvalidMethodSignature = 13,
286
- TemporaryError = 16,
287
- SuspendedAPIKey = 26,
288
- RateLimitExceeded = 29
289
- }
package/CHANGELOG.md DELETED
@@ -1,108 +0,0 @@
1
- # Changelog
2
-
3
- ## 1.4.3
4
-
5
- - fix missmatched types for Album and Track, added some optionals pity, but it works, that just how they give us the data.
6
-
7
- ## 1.4.2
8
-
9
- - bug, release dist
10
-
11
- ## 1.4.1
12
-
13
- - export esm modules modern js only.
14
- - add all dts and dts map files to dist
15
- - adds lastfm types to dist
16
-
17
- ## 1.4.0
18
-
19
- - update all api functions from snake case to camel case.
20
-
21
- ## 1.3.0
22
-
23
- - Updates npm dependencies.
24
- - refactors request with new error handling and responses.
25
- - updates getInfo, removes hte un-required params.
26
-
27
- ## 1.2.4
28
-
29
- - Updates npm dependencies.
30
- - Refactors request methods options and updates all callsites.
31
- - Add nvmrc file for easy switching node version.
32
-
33
- ## 1.2.3
34
-
35
- - Adds tests, using Playwright.
36
- - Adds dotenv npm module as a new dependency.
37
-
38
- ## 1.2.2
39
-
40
- - Put log back, some APIs do get Bad Request for MBIDs that don't exist, don't have solve for this yet, so not throwing any more as it grinds future request to a halt. This is a working version.
41
-
42
- ## 1.2.1
43
-
44
- - Tidy up, removes console logs.
45
-
46
- ## 1.2.0
47
-
48
- - Swops `node-fetch` for `cross-fetch` for server and browser fetching support in one.
49
-
50
- ## 1.1.5
51
-
52
- - Fix incorrect type on request method.
53
-
54
- ## 1.1.4
55
-
56
- - Fix incorrect type on request method.
57
-
58
- ## 1.1.3
59
-
60
- - Fix incorrect type import.
61
-
62
- ## 1.1.2
63
-
64
- - Fix broken type, Track image type is an array of Images.
65
-
66
- ## 1.1.1
67
-
68
- - update function declaration.
69
- - re-add type declartion files for source code.
70
-
71
- ## 1.1.0
72
-
73
- - Downgrade node-fetch to v2.6.7.
74
- - Do not ship separate declaration files.
75
- - TS now exports to CommonJs modules for better support older consumers.
76
-
77
- ## 1.0.6
78
-
79
- - Forking repo README update.
80
-
81
- ## 1.0.5
82
-
83
- - Fix local types.
84
- - Update readme with current way of using the types.
85
- - adds screenshot of it in use.
86
-
87
- ## 1.0.4
88
-
89
- - Export types.
90
-
91
- ## 1.0.3
92
-
93
- - Adds types file to distribution.
94
- - Updates readme with types imports.
95
-
96
- ## 1.0.2
97
-
98
- - Refactors types.d.ts to types.ts so can ship them with package and consumers can import them in their projects.
99
-
100
- ## 1.0.1
101
-
102
- - Refactors config and methods to own modules.
103
- - tsconfig, generate types to allow shipping types in one package, no need to DefinitleyTyped right now.
104
- - update docs with new way of interacting with API.
105
-
106
- ## 1.0.0
107
-
108
- - Initial project setup.