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.
- package/README.md +14 -2
- package/dist/cjs/auth.d.ts +12 -0
- package/dist/{auth.js → cjs/auth.js} +11 -11
- package/dist/cjs/chart/topArtists.d.ts +2 -0
- package/dist/cjs/chart/topArtists.js +13 -0
- package/dist/cjs/chart/topTags.d.ts +2 -0
- package/dist/cjs/chart/topTags.js +13 -0
- package/dist/cjs/chart/topTracks.d.ts +2 -0
- package/dist/cjs/chart/topTracks.js +13 -0
- package/dist/{config.d.ts → cjs/config.d.ts} +0 -1
- package/dist/{config.js → cjs/config.js} +0 -1
- package/dist/cjs/createOptions.d.ts +7 -0
- package/dist/{createOptions.js → cjs/createOptions.js} +2 -1
- package/dist/{getInfo.d.ts → cjs/getInfo.d.ts} +1 -2
- package/dist/{getInfo.js → cjs/getInfo.js} +2 -2
- package/dist/{getLovedTracks.d.ts → cjs/getLovedTracks.d.ts} +1 -2
- package/dist/{getLovedTracks.js → cjs/getLovedTracks.js} +2 -2
- package/dist/{getRecentTracks.d.ts → cjs/getRecentTracks.d.ts} +1 -2
- package/dist/{getRecentTracks.js → cjs/getRecentTracks.js} +2 -2
- package/dist/{getTopAlbums.d.ts → cjs/getTopAlbums.d.ts} +1 -2
- package/dist/{getTopAlbums.js → cjs/getTopAlbums.js} +2 -2
- package/dist/{getTopArtists.d.ts → cjs/getTopArtists.d.ts} +1 -2
- package/dist/{getTopArtists.js → cjs/getTopArtists.js} +2 -2
- package/dist/{getTopTracks.d.ts → cjs/getTopTracks.d.ts} +1 -2
- package/dist/{getTopTracks.js → cjs/getTopTracks.js} +2 -2
- package/dist/{getWeeklyAlbumChart.d.ts → cjs/getWeeklyAlbumChart.d.ts} +1 -2
- package/dist/{getWeeklyAlbumChart.js → cjs/getWeeklyAlbumChart.js} +2 -2
- package/dist/{getWeeklyArtistChart.d.ts → cjs/getWeeklyArtistChart.d.ts} +1 -2
- package/dist/{getWeeklyArtistChart.js → cjs/getWeeklyArtistChart.js} +2 -2
- package/dist/{getWeeklyChartList.d.ts → cjs/getWeeklyChartList.d.ts} +1 -2
- package/dist/{getWeeklyChartList.js → cjs/getWeeklyChartList.js} +2 -2
- package/dist/{getWeeklyTrackChart.d.ts → cjs/getWeeklyTrackChart.d.ts} +1 -2
- package/dist/{getWeeklyTrackChart.js → cjs/getWeeklyTrackChart.js} +2 -2
- package/dist/{index.d.ts → cjs/index.d.ts} +14 -3
- package/dist/cjs/index.js +41 -0
- package/dist/{method.d.ts → cjs/method.d.ts} +11 -1
- package/dist/{method.js → cjs/method.js} +5 -2
- package/dist/cjs/package.json +3 -0
- package/dist/{request.d.ts → cjs/request.d.ts} +0 -1
- package/dist/{request.js → cjs/request.js} +7 -15
- package/dist/mjs/auth.d.ts +12 -0
- package/dist/mjs/auth.js +16 -0
- package/dist/mjs/chart/topArtists.d.ts +2 -0
- package/dist/mjs/chart/topArtists.js +6 -0
- package/dist/mjs/chart/topTags.d.ts +2 -0
- package/dist/mjs/chart/topTags.js +6 -0
- package/dist/mjs/chart/topTracks.d.ts +2 -0
- package/dist/mjs/chart/topTracks.js +6 -0
- package/dist/mjs/config.d.ts +20 -0
- package/dist/mjs/config.js +22 -0
- package/dist/mjs/createOptions.d.ts +7 -0
- package/dist/mjs/createOptions.js +9 -0
- package/dist/mjs/getInfo.d.ts +8 -0
- package/dist/mjs/getInfo.js +12 -0
- package/dist/mjs/getLovedTracks.d.ts +8 -0
- package/dist/mjs/getLovedTracks.js +12 -0
- package/dist/mjs/getRecentTracks.d.ts +8 -0
- package/dist/mjs/getRecentTracks.js +12 -0
- package/dist/mjs/getTopAlbums.d.ts +8 -0
- package/dist/mjs/getTopAlbums.js +12 -0
- package/dist/mjs/getTopArtists.d.ts +8 -0
- package/dist/mjs/getTopArtists.js +12 -0
- package/dist/mjs/getTopTracks.d.ts +8 -0
- package/dist/mjs/getTopTracks.js +12 -0
- package/dist/mjs/getWeeklyAlbumChart.d.ts +8 -0
- package/dist/mjs/getWeeklyAlbumChart.js +12 -0
- package/dist/mjs/getWeeklyArtistChart.d.ts +8 -0
- package/dist/mjs/getWeeklyArtistChart.js +12 -0
- package/dist/mjs/getWeeklyChartList.d.ts +8 -0
- package/dist/mjs/getWeeklyChartList.js +12 -0
- package/dist/mjs/getWeeklyTrackChart.d.ts +8 -0
- package/dist/mjs/getWeeklyTrackChart.js +12 -0
- package/dist/mjs/index.d.ts +63 -0
- package/{src/index.ts → dist/mjs/index.js} +25 -18
- package/dist/mjs/method.d.ts +43 -0
- package/dist/mjs/method.js +20 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/request.d.ts +8 -0
- package/dist/mjs/request.js +119 -0
- package/lastfm-nodejs-client/package.json +7 -0
- package/package.json +41 -13
- package/.env.example +0 -6
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/codeql.yml +0 -74
- package/.github/workflows/playwright.yml +0 -36
- package/.nvmrc +0 -1
- package/.prettierrc.yaml +0 -6
- package/@types/index.d.ts +0 -289
- package/CHANGELOG.md +0 -108
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -9
- package/SECURITY.md +0 -13
- package/dist/auth.d.ts +0 -13
- package/dist/auth.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/createOptions.d.ts +0 -7
- package/dist/createOptions.d.ts.map +0 -1
- package/dist/getInfo.d.ts.map +0 -1
- package/dist/getLovedTracks.d.ts.map +0 -1
- package/dist/getRecentTracks.d.ts.map +0 -1
- package/dist/getTopAlbums.d.ts.map +0 -1
- package/dist/getTopArtists.d.ts.map +0 -1
- package/dist/getTopTracks.d.ts.map +0 -1
- package/dist/getWeeklyAlbumChart.d.ts.map +0 -1
- package/dist/getWeeklyArtistChart.d.ts.map +0 -1
- package/dist/getWeeklyChartList.d.ts.map +0 -1
- package/dist/getWeeklyTrackChart.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -31
- package/dist/method.d.ts.map +0 -1
- package/dist/request.d.ts.map +0 -1
- package/playwright.config.ts +0 -37
- package/src/auth.ts +0 -23
- package/src/config.ts +0 -34
- package/src/createOptions.ts +0 -12
- package/src/getInfo.ts +0 -17
- package/src/getLovedTracks.ts +0 -19
- package/src/getRecentTracks.ts +0 -19
- package/src/getTopAlbums.ts +0 -19
- package/src/getTopArtists.ts +0 -19
- package/src/getTopTracks.ts +0 -19
- package/src/getWeeklyAlbumChart.ts +0 -19
- package/src/getWeeklyArtistChart.ts +0 -19
- package/src/getWeeklyChartList.ts +0 -19
- package/src/getWeeklyTrackChart.ts +0 -20
- package/src/method.ts +0 -33
- package/src/request.ts +0 -133
- package/tests/env.spec.ts +0 -21
- package/tsconfig.dev.json +0 -7
- package/tsconfig.json +0 -104
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
* Demonstrating empathy and kindness toward other people
|
|
21
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
* Giving and gracefully accepting constructive feedback
|
|
23
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
-
overall community
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior include:
|
|
29
|
-
|
|
30
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
-
advances of any kind
|
|
32
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
-
* Public or private harassment
|
|
34
|
-
* Publishing others' private information, such as a physical or email
|
|
35
|
-
address, without their explicit permission
|
|
36
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Enforcement Responsibilities
|
|
40
|
-
|
|
41
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
-
or harmful.
|
|
45
|
-
|
|
46
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
-
decisions when appropriate.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
-
an individual is officially representing the community in public spaces.
|
|
55
|
-
Examples of representing our community include using an official e-mail address,
|
|
56
|
-
posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event.
|
|
58
|
-
|
|
59
|
-
## Enforcement
|
|
60
|
-
|
|
61
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
-
reported to the community leaders responsible for enforcement at
|
|
63
|
-
9pd5r3wqq@mozmail.com.
|
|
64
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
-
|
|
66
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
-
reporter of any incident.
|
|
68
|
-
|
|
69
|
-
## Enforcement Guidelines
|
|
70
|
-
|
|
71
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
-
|
|
74
|
-
### 1. Correction
|
|
75
|
-
|
|
76
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
-
unprofessional or unwelcome in the community.
|
|
78
|
-
|
|
79
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
-
clarity around the nature of the violation and an explanation of why the
|
|
81
|
-
behavior was inappropriate. A public apology may be requested.
|
|
82
|
-
|
|
83
|
-
### 2. Warning
|
|
84
|
-
|
|
85
|
-
**Community Impact**: A violation through a single incident or series
|
|
86
|
-
of actions.
|
|
87
|
-
|
|
88
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
-
interaction with the people involved, including unsolicited interaction with
|
|
90
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or
|
|
93
|
-
permanent ban.
|
|
94
|
-
|
|
95
|
-
### 3. Temporary Ban
|
|
96
|
-
|
|
97
|
-
**Community Impact**: A serious violation of community standards, including
|
|
98
|
-
sustained inappropriate behavior.
|
|
99
|
-
|
|
100
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
-
communication with the community for a specified period of time. No public or
|
|
102
|
-
private interaction with the people involved, including unsolicited interaction
|
|
103
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
-
Violating these terms may lead to a permanent ban.
|
|
105
|
-
|
|
106
|
-
### 4. Permanent Ban
|
|
107
|
-
|
|
108
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
-
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
-
the community.
|
|
114
|
-
|
|
115
|
-
## Attribution
|
|
116
|
-
|
|
117
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
-
version 2.0, available at
|
|
119
|
-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
-
|
|
121
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
-
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
-
|
|
124
|
-
[homepage]: https://www.contributor-covenant.org
|
|
125
|
-
|
|
126
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
-
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
-
https://www.contributor-covenant.org/translations.
|
package/CONTRIBUTING.md
DELETED
package/SECURITY.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# 🔐 Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
Dependabot alerts have been enabled and security patches to any dependencies will be brought to light and merged manually by maintainer.
|
|
6
|
-
|
|
7
|
-
| Version | Supported |
|
|
8
|
-
| ------- | ------------------ |
|
|
9
|
-
| 1.0.x | :white_check_mark: |
|
|
10
|
-
|
|
11
|
-
## Reporting a Vulnerability
|
|
12
|
-
|
|
13
|
-
If you find anything at all kindly report it as bug report here on github ✌️
|
package/dist/auth.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AuthResponse } from '../@types';
|
|
2
|
-
/**
|
|
3
|
-
* POST: Auth - LastFM
|
|
4
|
-
*
|
|
5
|
-
* https://www.last.fm/api/show/auth.getToken
|
|
6
|
-
*
|
|
7
|
-
* Authentication tokens are API account specific.
|
|
8
|
-
* They are valid for 60 minutes from the moment they are granted.
|
|
9
|
-
* Can only used once (they are consumed when a session is created).
|
|
10
|
-
* @returns Auth token
|
|
11
|
-
*/
|
|
12
|
-
export declare function auth(method: string, user: string, period: string, limit: string): Promise<AuthResponse>;
|
|
13
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAIzC;;;;;;;;;EASE;AACF,wBAAgB,IAAI,CAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,YAAY,CAAC,CAGvB"}
|
package/dist/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAcA;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAUD,CAAC"}
|
package/dist/createOptions.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOptions.d.ts","sourceRoot":"","sources":["../src/createOptions.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM;;;;;EAOf"}
|
package/dist/getInfo.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getInfo.d.ts","sourceRoot":"","sources":["../src/getInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAIzC;;;;;GAKG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,CAAC,CAGvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLovedTracks.d.ts","sourceRoot":"","sources":["../src/getLovedTracks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAIhD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,mBAAmB,CAAC,CAG9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getRecentTracks.d.ts","sourceRoot":"","sources":["../src/getRecentTracks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAIjD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,oBAAoB,CAAC,CAG/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getTopAlbums.d.ts","sourceRoot":"","sources":["../src/getTopAlbums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAI9C;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,iBAAiB,CAAC,CAG5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getTopArtists.d.ts","sourceRoot":"","sources":["../src/getTopArtists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAI/C;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,CAAC,CAG7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getTopTracks.d.ts","sourceRoot":"","sources":["../src/getTopTracks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,gBAAgB,CAAC,CAG3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getWeeklyAlbumChart.d.ts","sourceRoot":"","sources":["../src/getWeeklyAlbumChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAIrD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,wBAAwB,CAAC,CAGnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getWeeklyArtistChart.d.ts","sourceRoot":"","sources":["../src/getWeeklyArtistChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAItD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,yBAAyB,CAAC,CAGpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getWeeklyChartList.d.ts","sourceRoot":"","sources":["../src/getWeeklyChartList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAIpD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,uBAAuB,CAAC,CAGlC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getWeeklyTrackChart.d.ts","sourceRoot":"","sources":["../src/getWeeklyTrackChart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAKrD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,wBAAwB,CAAC,CAGnC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcb,CAAA;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const auth_1 = require("./auth");
|
|
4
|
-
const config_1 = require("./config");
|
|
5
|
-
const getInfo_1 = require("./getInfo");
|
|
6
|
-
const getLovedTracks_1 = require("./getLovedTracks");
|
|
7
|
-
const getRecentTracks_1 = require("./getRecentTracks");
|
|
8
|
-
const getTopAlbums_1 = require("./getTopAlbums");
|
|
9
|
-
const getTopArtists_1 = require("./getTopArtists");
|
|
10
|
-
const getTopTracks_1 = require("./getTopTracks");
|
|
11
|
-
const getWeeklyAlbumChart_1 = require("./getWeeklyAlbumChart");
|
|
12
|
-
const getWeeklyArtistChart_1 = require("./getWeeklyArtistChart");
|
|
13
|
-
const getWeeklyChartList_1 = require("./getWeeklyChartList");
|
|
14
|
-
const getWeeklyTrackChart_1 = require("./getWeeklyTrackChart");
|
|
15
|
-
const method_1 = require("./method");
|
|
16
|
-
const LastFmApi = () => ({
|
|
17
|
-
auth: auth_1.auth,
|
|
18
|
-
config: config_1.config,
|
|
19
|
-
getInfo: getInfo_1.getInfo,
|
|
20
|
-
getLovedTracks: getLovedTracks_1.getLovedTracks,
|
|
21
|
-
getRecentTracks: getRecentTracks_1.getRecentTracks,
|
|
22
|
-
getTopAlbums: getTopAlbums_1.getTopAlbums,
|
|
23
|
-
getTopArtists: getTopArtists_1.getTopArtists,
|
|
24
|
-
getTopTracks: getTopTracks_1.getTopTracks,
|
|
25
|
-
getWeeklyAlbumChart: getWeeklyAlbumChart_1.getWeeklyAlbumChart,
|
|
26
|
-
getWeeklyArtistChart: getWeeklyArtistChart_1.getWeeklyArtistChart,
|
|
27
|
-
getWeeklyChartList: getWeeklyChartList_1.getWeeklyChartList,
|
|
28
|
-
getWeeklyTrackChart: getWeeklyTrackChart_1.getWeeklyTrackChart,
|
|
29
|
-
method: method_1.method,
|
|
30
|
-
});
|
|
31
|
-
exports.default = LastFmApi;
|
package/dist/method.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"method.d.ts","sourceRoot":"","sources":["../src/method.ts"],"names":[],"mappings":"AAAA,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAcD,CAAC"}
|
package/dist/request.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkCD,QAAA,MAAM,OAAO,wBAA6B,cAAc,wBAwFvD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/playwright.config.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { devices, PlaywrightTestConfig } from '@playwright/test';
|
|
2
|
-
import * as dotenv from 'dotenv'; // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
|
|
3
|
-
dotenv.config();
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* See https://playwright.dev/docs/test-configuration.
|
|
7
|
-
*/
|
|
8
|
-
const config: PlaywrightTestConfig = {
|
|
9
|
-
testDir: './tests',
|
|
10
|
-
timeout: 30 * 1000,
|
|
11
|
-
expect: {
|
|
12
|
-
timeout: 5000,
|
|
13
|
-
},
|
|
14
|
-
fullyParallel: true,
|
|
15
|
-
forbidOnly: !!process.env.CI,
|
|
16
|
-
retries: process.env.CI ? 2 : 0,
|
|
17
|
-
workers: process.env.CI ? 1 : undefined,
|
|
18
|
-
reporter: 'html',
|
|
19
|
-
use: {
|
|
20
|
-
actionTimeout: 0,
|
|
21
|
-
trace: 'on-first-retry',
|
|
22
|
-
headless: true,
|
|
23
|
-
},
|
|
24
|
-
projects: [
|
|
25
|
-
{
|
|
26
|
-
name: 'chromium',
|
|
27
|
-
use: { ...devices['Desktop Chrome'] },
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
// outputDir: 'test-results/',
|
|
31
|
-
// webServer: {
|
|
32
|
-
// command: 'npm run dev',
|
|
33
|
-
// port: 3000,
|
|
34
|
-
// },
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default config;
|
package/src/auth.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AuthResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* POST: Auth - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/auth.getToken
|
|
9
|
-
*
|
|
10
|
-
* Authentication tokens are API account specific.
|
|
11
|
-
* They are valid for 60 minutes from the moment they are granted.
|
|
12
|
-
* Can only used once (they are consumed when a session is created).
|
|
13
|
-
* @returns Auth token
|
|
14
|
-
*/
|
|
15
|
-
export function auth(
|
|
16
|
-
method: string,
|
|
17
|
-
user: string,
|
|
18
|
-
period: string,
|
|
19
|
-
limit: string,
|
|
20
|
-
): Promise<AuthResponse> {
|
|
21
|
-
const options = createOptions(method, user, period, limit);
|
|
22
|
-
return request<AuthResponse>(options);
|
|
23
|
-
}
|
package/src/config.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as dotenv from 'dotenv';
|
|
2
|
-
dotenv.config();
|
|
3
|
-
|
|
4
|
-
interface Config {
|
|
5
|
-
api_key: string;
|
|
6
|
-
app_name: string;
|
|
7
|
-
base_url: string;
|
|
8
|
-
format: {
|
|
9
|
-
json: string;
|
|
10
|
-
xml: string;
|
|
11
|
-
};
|
|
12
|
-
share_secret: string;
|
|
13
|
-
username: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* @description Stores the Last.fm API key, app name, base url, format, shared secret, and username.
|
|
17
|
-
* Simply add a .env file to the root of the project and add the following:
|
|
18
|
-
* LASTFM_API_KEY=your_api_key
|
|
19
|
-
* LASTFM_APPNAME=your_app_name
|
|
20
|
-
* LASTFM_API_BASE_URL=your_base_url
|
|
21
|
-
* LASTFM_SHARED_SECRET=your_shared_secret
|
|
22
|
-
* LASTFM_USER=your_username
|
|
23
|
-
*/
|
|
24
|
-
export const config = {
|
|
25
|
-
api_key: `${process.env.LASTFM_API_KEY}`,
|
|
26
|
-
app_name: `${process.env.LASTFM_APPNAME}`,
|
|
27
|
-
base_url: `${process.env.LASTFM_API_BASE_URL}`,
|
|
28
|
-
format: {
|
|
29
|
-
json: 'json',
|
|
30
|
-
xml: 'xml',
|
|
31
|
-
},
|
|
32
|
-
share_secret: `${process.env.LASTFM_SHARED_SECRET}`,
|
|
33
|
-
username: `${process.env.LASTFM_USER}`,
|
|
34
|
-
} satisfies Config;
|
package/src/createOptions.ts
DELETED
package/src/getInfo.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { UserResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: User profile information - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getInfo
|
|
9
|
-
* @returns User profile information
|
|
10
|
-
*/
|
|
11
|
-
export function getInfo(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
): Promise<UserResponse> {
|
|
15
|
-
const options = createOptions(method, user);
|
|
16
|
-
return request<UserResponse>(options);
|
|
17
|
-
}
|
package/src/getLovedTracks.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { LovedTracksResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Love Tracks - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getLovedTracks
|
|
9
|
-
* @returns Loved Tracks;
|
|
10
|
-
*/
|
|
11
|
-
export function getLovedTracks(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<LovedTracksResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<LovedTracksResponse>(options);
|
|
19
|
-
}
|
package/src/getRecentTracks.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { RecentTracksResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Recent Tracks - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getRecentTracks
|
|
9
|
-
* @returns Recent Tracks
|
|
10
|
-
*/
|
|
11
|
-
export function getRecentTracks(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<RecentTracksResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<RecentTracksResponse>(options);
|
|
19
|
-
}
|
package/src/getTopAlbums.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TopAlbumsResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Top Albums - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getTopAlbums
|
|
9
|
-
* @returns Top Albums
|
|
10
|
-
*/
|
|
11
|
-
export function getTopAlbums(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<TopAlbumsResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<TopAlbumsResponse>(options);
|
|
19
|
-
}
|
package/src/getTopArtists.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TopArtistsResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Top Artist - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getTopArtists
|
|
9
|
-
* @returns Top Artists
|
|
10
|
-
*/
|
|
11
|
-
export function getTopArtists(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<TopArtistsResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<TopArtistsResponse>(options);
|
|
19
|
-
}
|
package/src/getTopTracks.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TopTrackResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Top Tracks - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getTopTracks
|
|
9
|
-
* @returns Top Tracks
|
|
10
|
-
*/
|
|
11
|
-
export function getTopTracks(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<TopTrackResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<TopTrackResponse>(options);
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { WeeklyAlbumChartResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Weekly album chart - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getWeeklyAlbumChart
|
|
9
|
-
* @returns Weekly album chart
|
|
10
|
-
*/
|
|
11
|
-
export function getWeeklyAlbumChart(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<WeeklyAlbumChartResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<WeeklyAlbumChartResponse>(options);
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { WeeklyArtistChartResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Weekly artist chart - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getWeeklyArtistChart
|
|
9
|
-
* @returns Weekly artist chart
|
|
10
|
-
*/
|
|
11
|
-
export function getWeeklyArtistChart(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<WeeklyArtistChartResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<WeeklyArtistChartResponse>(options);
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { WeeklyChartListResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* GET: Weekly chart list - LastFM
|
|
7
|
-
*
|
|
8
|
-
* https://www.last.fm/api/show/user.getWeeklyChartList
|
|
9
|
-
* @returns Weekly chart list
|
|
10
|
-
*/
|
|
11
|
-
export function getWeeklyChartList(
|
|
12
|
-
method: string,
|
|
13
|
-
user: string,
|
|
14
|
-
period: string,
|
|
15
|
-
limit: string,
|
|
16
|
-
): Promise<WeeklyChartListResponse> {
|
|
17
|
-
const options = createOptions(method, user, period, limit);
|
|
18
|
-
return request<WeeklyChartListResponse>(options);
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { WeeklyTrackChartResponse } from '../@types';
|
|
2
|
-
import { createOptions } from './createOptions';
|
|
3
|
-
import request from './request';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* GET: Weekly track chart - LastFM
|
|
8
|
-
*
|
|
9
|
-
* https://www.last.fm/api/show/user.getWeeklyTrackChart
|
|
10
|
-
* @returns Weekly track chart
|
|
11
|
-
*/
|
|
12
|
-
export function getWeeklyTrackChart(
|
|
13
|
-
method: string,
|
|
14
|
-
user: string,
|
|
15
|
-
period: string,
|
|
16
|
-
limit: string,
|
|
17
|
-
): Promise<WeeklyTrackChartResponse> {
|
|
18
|
-
const options = createOptions(method, user, period, limit);
|
|
19
|
-
return request<WeeklyTrackChartResponse>(options);
|
|
20
|
-
}
|
package/src/method.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
interface UserMethod {
|
|
2
|
-
getInfo: string;
|
|
3
|
-
getLovedTracks: string;
|
|
4
|
-
getRecentTracks: string;
|
|
5
|
-
getTopAlbums: string;
|
|
6
|
-
getTopArtists: string;
|
|
7
|
-
getTopTracks: string;
|
|
8
|
-
getWeeklyAlbumChart: string;
|
|
9
|
-
getWeeklyArtistChart: string;
|
|
10
|
-
getWeeklyChartList: string;
|
|
11
|
-
getWeeklyTrackChart: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export interface Method {
|
|
15
|
-
auth: string;
|
|
16
|
-
user: UserMethod;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const method = {
|
|
20
|
-
auth: 'auth.getToken',
|
|
21
|
-
user: {
|
|
22
|
-
getInfo: 'user.getInfo',
|
|
23
|
-
getLovedTracks: 'user.getLovedTracks',
|
|
24
|
-
getRecentTracks: 'user.getRecentTracks',
|
|
25
|
-
getTopAlbums: 'user.getTopAlbums',
|
|
26
|
-
getTopArtists: 'user.getTopArtists',
|
|
27
|
-
getTopTracks: 'user.getTopTracks',
|
|
28
|
-
getWeeklyAlbumChart: 'user.getWeeklyAlbumChart',
|
|
29
|
-
getWeeklyArtistChart: 'user.getWeeklyArtistChart',
|
|
30
|
-
getWeeklyChartList: 'user.getWeeklyChartList',
|
|
31
|
-
getWeeklyTrackChart: 'user.getWeeklyTrackChart',
|
|
32
|
-
},
|
|
33
|
-
} satisfies Method;
|