UNPKG
@maserokun/yandex-music-api
Version:
latest (1.0.8)
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Forked version of https://github.com/kontsevoye/ym-api with some changes
@maserokun/yandex-music-api
/
example
/
feed.ts
14 lines
(12 loc)
•
283 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
{
YMApi
}
from
"../src"
;
import
config
from
"./config"
;
const
api =
new
YMApi
(); (
async
() => {
try
{
await
api.
init
(config.
user
);
const
feed =
await
api.
getFeed
();
console
.
log
({
s
: feed }); }
catch
(e) {
console
.
log
(
`api error:
${e.message}
`
); } })();