Giter Club home page Giter Club logo

shpotify's Introduction

shpotify

This is a command line interface to the Spotify API, written in zsh. It also requires jq and curl which you may need to install yourself.

To get started, get set up with the Spotify API. For details: https://developer.spotify.com/web-api/tutorial/

  • Store your Spotify Client ID in the file ~/config/shpotify/.env.d/SPOTIFY_CLIENT_ID.
  • Store your Spotify Client Secret in the file ~/config/shpotify/.env.d/SPOTIFY_CLIENT_SECRET.
  • Store your Spotify Refresh Token in ~/config/shpotify/.env.d/SPOTIFY_REFRESH_TOKEN.
  • Store your Spotify Access Token in ~/config/shpotify/.env.d/SPOTIFY_ACCESS_TOKEN.

Your access token will expire in about an hour but shpotify will automatically refresh it if it's nearing or past expiration.

Running it

Clone this repo and cd into it. Load the zsh completion:

eval "$(./shpotify --completion-code)"

Type ./shpotify and hit your "tab" key to see what's available.

This is a very incomplete implementation of the API. If zsh tab completion exists for it, consider it supported.

shpotify's People

Contributors

drench avatar

Stargazers

Brian Roach avatar

Watchers

 avatar James Cloos avatar  avatar

shpotify's Issues

get playlists only fetches the first 100 tracks

The get_playlists function does a GET /v1/playlists/:id call. This returns basic playlist metadata along with the first batch of tracks. If there are more than 100, it offers a next URL. The complication is that this next URL is not a /v1/playlists/:id call but a /v1/playlists/:id/tracks call.

Update get_playlists to something like:

  • GET /v1/playlists/:id
  • While .tracks.next is not null, call the next URL
    • Take the result of the next (which is a list of tracks) and append it to the tracks array from the initial call

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.