
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
A lousy and very badly programmed Spotify API Client written in Ruby.
If you'd rather have a proper, working, supported library I do recommend RSpotify.
Seriously, don't just run gem install simplespotify
, it'll ruin your day.
You've suffered enough registering an app with Spotify and setting up your redirection URIs, why would you want to...?
client = SimpleSpotify::Client.new(client_id, client_secret)
redirect_uri = 'http://your-redirect-uri'
if ARGV[0] == 'login'
login_url = SimpleSpotify::Authorization.login_uri redirect_uri, client, scope: 'playlist-modify-public user-read-private'
puts login_url
elsif ARGV[0] == 'code'
# Copy the `code` param from your browser...
code = ARGV[1].strip
auth = SimpleSpotify::Authorization.from_code code, client: client, redirect: redirect_uri
puts auth.to_h
else
# now do the same for the `access_token` and `refresh_token`
token = ARGV[0]
refresh_token = ARGV[1]
client.session = SimpleSpotify::Authorization.new access_token: token, refresh_token: refresh_token, client: client
me = client.me
puts me.to_h
end
It's all syntactic sugar, but not the right kind that makes you happy and stuff, but the distasteful one that comes with coffee in an airplane. Seriously, it's not even properly tested!
playlist = client.playlist(some_user_id, some_playlist_id)
if playlist.tracks.total >= 10
extra = (playlist.tracks.total - 10)
playlist.remove_tracks positions: (0..extra).to_a
end
playlist.add_tracks('spotify:track:1SWhZ2rIxTPv9UcexFnPSU')
# or
client.playlist_tracks_add(playlist, tracks: '1SWhZ2rIxTPv9UcexFnPSU'})
# or even
client.post "/user/#{_user_}/playlists/#{_playlist_id_}/tracks", {uris: ['spotify:track:1SWhZ2rIxTPv9UcexFnPSU']}
client.session.on_refresh do |sess|
# Then token was refreshed on the last call
cache[:spotify_session] = sess.to_h
end
# And maybe later...
credentials = cache[:spotify_session]
credentials[:client] = client
client.session = SimpleSpotify::Authorization.new(credentials)
FAQs
Unknown package
We found that simplespotify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.