File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -18,3 +18,24 @@ const np = new NowPlaying(Providers.SPOTIFY, {
1818 storageKind: StorageKinds .INMEMORY ,
1919});
2020```
21+
22+
23+ ### With Spotify
24+ ``` ts
25+ import {
26+ NowPlaying ,
27+ Providers ,
28+ StorageKinds ,
29+ } from " @BolajiOlajide/now-playing" ;
30+
31+ const np = new NowPlaying (Providers .SPOTIFY , {
32+ storageKind: StorageKinds .INMEMORY ,
33+ useCache: false , // default is true
34+ cacheDuration: 30000 , // in milliseconds
35+ streamerArgs: {
36+ clientId: " foo" ,
37+ clientSecret: " bar" ,
38+ refreshToken: " baz" ,
39+ }
40+ });
41+ ```
Original file line number Diff line number Diff line change 1+ import { NowPlaying , Providers , StorageKinds } from "../src" ;
2+
3+ const np = new NowPlaying ( Providers . SPOTIFY , {
4+ storageKind : StorageKinds . INMEMORY ,
5+ useCache : false ,
6+ cacheDuration : 30000 , // in milliseconds
7+ streamerArgs : {
8+ clientId : "foo" ,
9+ clientSecret : "bar" ,
10+ refreshToken : "baz" ,
11+ }
12+ } ) ;
13+
14+ console . log ( "Hello World" , np ) ;
You can’t perform that action at this time.
0 commit comments