Socket
Book a DemoInstallSign in
Socket

spotify-ruby-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotify-ruby-api

0.7.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

spotify-ruby-api

This gem was developed with the purpose of retrieve information from Spotify service by using its API.

Installation

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

Usage

require 'spotify'

Albums

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

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

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]

Todo

The following table shows all API endpoints and if each one is already implemented or not.

MethodEndPointsImplemented?
GET/v1/albums/{id}YES
GET/v1/albums?ids={ids}YES
GET/v1/albums/{id}/tracksYES
GET/v1/artists/{id}YES
GET/v1/artists?ids={ids}YES
GET/v1/artists/{id}/albumsYES
GET/v1/artists/{id}/top-tracksYES
GET/v1/artists/{id}/related-artistsYES
GET/v1/browse/featured-playlistsNO
GET/v1/browse/new-releasesNO
GET/v1/browse/categoriesNO
GET/v1/browse/categories/{id}NO
GET/v1/browse/categories/{id}/playlistsNO
GET/v1/meNO
GET/v1/me/followingNO
PUT/v1/me/followingNO
DELETE/v1/me/followingNO
GET/v1/me/following/containsNO
PUT/v1/users/{owner_id}/playlists/{playlist_id}/followersNO
DELETE/v1/users/{owner_id}/playlists/{playlist_id}/followersNO
PUT/v1/me/tracks?ids={ids}NO
GET/v1/me/tracksNO
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/albumsNO
DELETE/v1/me/albums?ids={ids}NO
GET/v1/me/albums/contains?ids={ids}NO
GET/v1/search?type=albumYES
GET/v1/search?type=artistYES
GET/v1/search?type=playlistYES
GET/v1/search?type=trackYES
GET/v1/tracks/{id}YES
GET/v1/tracks?ids={ids}YES
GET/v1/users/{user_id}YES
GET/v1/users/{user_id}/playlistsNO
GET/v1/me/playlistsNO
GET/v1/users/{user_id}/playlists/{playlist_id}NO
GET/v1/users/{user_id}/playlists/{playlist_id}/tracksNO
POST/v1/users/{user_id}/playlistsNO
PUT/v1/users/{user_id}/playlists/{playlist_id}NO
POST/v1/users/{user_id}/playlists/{playlist_id}/tracksNO
DELETE/v1/users/{user_id}/playlists/{playlist_id}/tracksNO
PUT/v1/users/{user_id}/playlists/{playlist_id}/tracksNO
PUT/v1/users/{user_id}/playlists/{playlist_id}/tracksNO
GET/v1/users/{user_id}/playlists/{playlist_id}/followers/containsNO

Development

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.

Contributing

  • Fork it ( https://github.com/felipegruoso/spotify-api/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 02 Dec 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.