Git Product home page Git Product logo

ps-spotify's Introduction

ps-spotify

A PowerShell module that talks to your Spotify client!

How does this work?

This PowerShell module acts as a wrapper around the Spotify Web API. You will be able to e.g. search for songs, albums and playlists, you can even fiddle around with Spotify Connect if you want to. Just like any other Spotify API implementation, you'll need to provide a basic bearer (base64 encoded string of client_id_goes_here:client_secret_goes_here) and a refresh token. Please take a look at my other project - dotnet-core-spotify-authentication - this is an open-source utility you can use to get your needed refresh token. You fill in the two needed tokens in ps-spotify.psm1 and you are good to go!

If things are unclear, please check out these two articles on my website:

https://bartsimons.me/net-core-and-the-spotify-api-getting-authenticated/
https://bartsimons.me/ps-spotify-a-powershell-module-to-control-the-spotify-web-api/

Currently implemented functions:

  • Find-SpotifyItem
  • Get-SpotifyAlbum
  • Get-SpotifyAlbums
  • Get-SpotifyCategory
  • Get-SpotifyCategories
  • Get-SpotifyCategoryPlaylists
  • Get-SpotifyConnectDevice
  • Get-SpotifyConnectDevices
  • Get-SpotifyCurrentlyPlaying
  • Get-SpotifyFeaturedPlaylists
  • Get-SpotifyNewReleases
  • Get-SpotifyTrack
  • Get-SpotifyTracks
  • Get-SpotifyUser
  • Invoke-SpotifyConnectPrevious
  • Invoke-SpotifyConnectSkip
  • Set-SpotifyConnectPause
  • Set-SpotifyConnectPlay
  • Set-SpotifyConnectPlayer
  • Set-SpotifyConnectRepeat
  • Set-SpotifyConnectSeek
  • Set-SpotifyConnectShuffle
  • Set-SpotifyConnectVolume

Install guide:
First of all, make sure you have Git installed on your computer (I recommend the Github client).
Start up a Git shell, and run the following command
git clone https://github.com/bmsimons/ps-spotify.git You can now close your git client window. You can now import this module like this:
Import-Module ./ps-spotify/ps-spotify
and now you can make use of all documented commands. Happy Spotifying!

Compatibility This module has been tested and proven to be working on Microsoft Windows, Apple macOS, and Linux. If something doesn't work, try to upgrade to a newer PowerShell release. In case if you are using Microsoft Windows, try to use the open-source PowerShell version.

Changelog:

  • v1.0 (Current): Code base has been completely rebuilt.
  • v0.3a: Added automatic Spotify web helper port fetching.
  • v0.3: Major overhaul, added cmdlet parameter binding and merged play functions into single cmdlet.
  • v0.2 Second release
  • v0.1g: Updated markdown
  • v0.1f: Updated the documentation, renamed module file
  • v0.1e: Added a Get-SpotifySearch function
  • v0.1a: Readme markdown fixes
  • v0.1: Initial release

ps-spotify's People

Contributors

bmsimons avatar dotps1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ps-spotify's Issues

{"error":"invalid_client"}

The latest version of ps-spotify (Wooo official update!) seems to spit "{"error":"invalid_client"}" with every cmdlet, but still returns the output properly.

I presume this is because I specified an access token and refresh token in the psm1, but did not provide SpotifyBasicBearer. I put in the info that the spec requests (https://developer.spotify.com/web-api/authorization-guide/ "Base 64 encoded string that contains the client ID and client secret key. The field must have the format: Authorization: Basic ") and it works fine.

I'm not sure if i'm reading the readme incorrectly, or if it's just late, but I think it could use a little bit of clarification.

Thanks a ton for the latest update though! I just happened to be revisiting some of my older Spotify scripts and noticed it was updated. I also may just be missing or mis-reading something blatantly obvious, please let me know if this is the case! I've been up for too long ๐Ÿ˜„

Versioning of dotnet

I'm getting an error related to the version of the dotnet program is not compatiable.

C:\repo\dotnet-core-spotify-authentication\dotnet-core-spotify-authentication.csproj : error NU1202: Package Microsoft.AspNetCore.All 2.1.5 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.AspNetCore.All 2.1.5 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)

Using Ps-Spotitfy WITHOUT dotnet-core-spotify-authentication?

Is there a way to use ps-spotify without having to first compile and run dotnet-core-spotify-authentication? I don't have a dotnet build environment but I would like to use ps-spotify. A connect-Spotify cmdlet would be nice to have in lieu. Any work-around would be greatly appreciated (including a how-to). Thanks.

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.