Skip to content

Latest commit

 

History

History
125 lines (114 loc) · 3.92 KB

README.md

File metadata and controls

125 lines (114 loc) · 3.92 KB

Spotify GraphQL npm version https://david-dm.org/wittydeveloper/spotify-graphql TypeScript

GraphQL schema for Spotify Web API — TypeScript / Node.js (v6)


Try with the interactive console !

See spotify-graphql-examples for more examples


import SpotifyGraphQLClient from '../src/spotify-graphql';
import config from './config';

SpotifyGraphQLClient(config).query(`
  {
    track(id: "3W2ZcrRsInZbjWylOi6KhZ") {
      name
      artists {
        name
      }
    }
  }
`).then(result => {
  console.log(JSON.stringify(result));
});

// Print : 
// {
//   "data": {
//     "track": {
//       "name": "You & Me - Flume Remix",
//       "artists": [
//         {
//           "name": "Disclosure"
//         },
//         {
//           "name": "Eliza Doolittle"
//         },
//         {
//           "name": "Flume"
//         }
//       ]
//     }
//   }
// }

Queries

Albums

  • Get an Album ✅
  • Get Several Albums ✅
  • Get an Album's Tracks ✅

Artists

  • Get an Artist ✅
  • Get Several Artists ✅
  • Get an Artist's Albums ✅
  • Get an Artist's Top Tracks ✅
  • Get an Artist's Related Artists ✅

Tracks

  • Get a Track ✅
  • Get Several Tracks ✅
  • Get Audio Features for a Track ✅
  • Get Audio Features for Several Tracks ✅
  • Get Audio Analysis for a Track ❌

Search

  • Search for an Item ✅

Playlists

  • Get a List of a User's Playlists ✅
  • Get a List of Current User's Playlists ✅
  • Get a Playlist ✅
  • Get a Playlist's Tracks ✅

Create a Playlist

  • Add Tracks to a Playlist ❌
  • Remove Tracks from a Playlist ❌
  • Reorder or replace a Playlist's Tracks ❌
  • Change a Playlist's Details ❌

User Profiles