
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
This gem was developed with the purpose of retrieve information from Spotify service by using its API.
Add this line to your application's Gemfile:
gem 'spotify-ruby-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install spotify-ruby-api
require 'spotify'
albums_api = Spotify::API::Albums
albums_api.search_by_id(id: '') # => Spotify::Models::Full::Album
albums_api.search_by_ids(ids: []) # => [Spotify::Models::Full::Album]
tracks = albums_api.tracks(id: '') # => Spotify::Models::Paging
tracks.items # => [Spotify::Models::Simplified::Track]
tracks_api = Spotify::API::Track
tracks_api.search_by_id(id: '') # => Spotify::Models::Full::Track
tracks_api.search_by_ids(ids: '') # => [Spotify::Models::Full::Track]
artists_api = Spotify::API::Artist
artists_api.search_by_id(id: '') # => Spotify::Models::Full::Artist
artists_api.search_by_ids(ids: '') # => [Spotify::Models::Full::Artist]
albums = artists_api.albums(id: '') # => Spotify::Models::Paging
albums.items # => Spotify::Models::Simplified::Album
top_tracks = artists_api.top_tracks(id: '') # => Spotify::Models::Paging
top_tracks.items # => Spotify::Models::Full::Track
related_artists = artists_api.related_artists(id: '') # => Spotify::Models::Paging
related_artists.items # => [Spotify::Models::Full::Artist]
The following table shows all API endpoints and if each one is already implemented or not.
Method | EndPoints | Implemented? |
---|---|---|
GET | /v1/albums/{id} | YES |
GET | /v1/albums?ids={ids} | YES |
GET | /v1/albums/{id}/tracks | YES |
GET | /v1/artists/{id} | YES |
GET | /v1/artists?ids={ids} | YES |
GET | /v1/artists/{id}/albums | YES |
GET | /v1/artists/{id}/top-tracks | YES |
GET | /v1/artists/{id}/related-artists | YES |
GET | /v1/browse/featured-playlists | NO |
GET | /v1/browse/new-releases | NO |
GET | /v1/browse/categories | NO |
GET | /v1/browse/categories/{id} | NO |
GET | /v1/browse/categories/{id}/playlists | NO |
GET | /v1/me | NO |
GET | /v1/me/following | NO |
PUT | /v1/me/following | NO |
DELETE | /v1/me/following | NO |
GET | /v1/me/following/contains | NO |
PUT | /v1/users/{owner_id}/playlists/{playlist_id}/followers | NO |
DELETE | /v1/users/{owner_id}/playlists/{playlist_id}/followers | NO |
PUT | /v1/me/tracks?ids={ids} | NO |
GET | /v1/me/tracks | NO |
DELETE | /v1/me/tracks?ids={ids} | NO |
GET | /v1/me/tracks/contains?ids={ids} | NO |
PUT | /v1/me/albums?ids={ids} | NO |
GET | /v1/me/albums | NO |
DELETE | /v1/me/albums?ids={ids} | NO |
GET | /v1/me/albums/contains?ids={ids} | NO |
GET | /v1/search?type=album | YES |
GET | /v1/search?type=artist | YES |
GET | /v1/search?type=playlist | YES |
GET | /v1/search?type=track | YES |
GET | /v1/tracks/{id} | YES |
GET | /v1/tracks?ids={ids} | YES |
GET | /v1/users/{user_id} | YES |
GET | /v1/users/{user_id}/playlists | NO |
GET | /v1/me/playlists | NO |
GET | /v1/users/{user_id}/playlists/{playlist_id} | NO |
GET | /v1/users/{user_id}/playlists/{playlist_id}/tracks | NO |
POST | /v1/users/{user_id}/playlists | NO |
PUT | /v1/users/{user_id}/playlists/{playlist_id} | NO |
POST | /v1/users/{user_id}/playlists/{playlist_id}/tracks | NO |
DELETE | /v1/users/{user_id}/playlists/{playlist_id}/tracks | NO |
PUT | /v1/users/{user_id}/playlists/{playlist_id}/tracks | NO |
PUT | /v1/users/{user_id}/playlists/{playlist_id}/tracks | NO |
GET | /v1/users/{user_id}/playlists/{playlist_id}/followers/contains | NO |
After checking out the repo, run bin/setup
to install dependencies. Then, run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that spotify-ruby-api 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.