Skip to content

Commit

Permalink
docs(readme.md): update basic code example
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgrieger committed Jun 27, 2020
1 parent 620b238 commit ca8bb89
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ npm install spotify-web-api-ts
```typescript
import { SpotifyWebApi } from 'spotify-web-api-ts';

const spotify = new SpotifyWebApi({
accessToken: '<YOUR_ACCESS_TOKEN_HERE>',
});
const spotify = new SpotifyWebApi({ accessToken: '<YOUR_ACCESS_TOKEN_HERE>' });

const { artists } = await spotify.albums.getAlbum('1uzfGk9vxMXfaZ2avqwxod');

console.log(artists.map(artist => artist.name));
// ['Against All Logic']
// Array [ "Against All Logic" ]
```

0 comments on commit ca8bb89

Please sign in to comment.