Skip to content

Commit

Permalink
Merge branch '3.0-pre' of github.com:hnarayanan/shpotify
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmasuy committed Sep 27, 2020
2 parents 07fa711 + 7ba72f1 commit e3d6029
Show file tree
Hide file tree
Showing 2 changed files with 373 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ following a few simple steps:
shpotify needs to connect to Spotify’s API in order to find music by
name. It is very likely you want this feature!

Spotify API has a 'public' part, for which developer/app are sufficient,
and it has a 'private' part, for which 'user authorization' is required.

To get this to work, you first need to sign up (or into) Spotify’s
developer site and [create an *Application*][spotify-dev]. Once you’ve
done so, you can find its `Client ID` and `Client Secret` values and
Expand All @@ -57,6 +60,16 @@ CLIENT_ID="abc01de2fghijk345lmnop"
CLIENT_SECRET="qr6stu789vwxyz"
````

If 'user authentication' is required, a spotify website will open in your
default browser asking for permission. After granting permission, a new
'localhost' site will be opened on port 8082 with a code in the URL. This code
is caught by Shpotify and is used to get the user-access code and user-refresh
token. From now it is possible to get information linked to your account, like
your playlists, history, devices, etc.

_note: thise page is supposed to automatically close, but that doesn't always
work properly._

## Usage

With shpotify you can control Spotify with the following commands:
Expand Down Expand Up @@ -85,13 +98,26 @@ spotify status Shows the play status, including the current
spotify status artist Shows the currently playing artist.
spotify status album Shows the currently playing album.
spotify status track Shows the currently playing track.
spotify status liked <uri>* Shows if a track or album is liked or not.
spotify share Displays the current song's Spotify URL and URI.
spotify share url Displays the current song's Spotify URL and copies it to the clipboard.
spotify share uri Displays the current song's Spotify URI and copies it to the clipboard.
spotify toggle shuffle Toggles shuffle playback mode.
spotify toggle repeat Toggles repeat playback mode.
spotify list uri <format> <uri> List information about track, album or playlist by uri. Format in csv|tsv|text|html"
spotify list myalbums <format>* List 50 of your last liked albums, format in csv|tsv|text|html";
spotify list mytracks <format>* List 50 of your last liked songs, format in csv|tsv|text|html";
spotify list mine <format>* List 'my' playlists (uri, title, public), format in csv|tsv|text|html";
spotify list history <format>* List 30 last played tracks (uri, title, artist, album), format in csv|tsv|text|html
spotify like <uri>* Like a song or album and add it to your library.";
spotify -v | --version Shows the shpotify and spotify versions.";
* Please note that this requires authentication via a browser."
````

## Authors and contributing
Expand Down
Loading

0 comments on commit e3d6029

Please sign in to comment.