Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spotifiery

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotifiery

  • 0.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Spotifiery

Spotifiery is a simple wrapper for the Spotify web API.

Installation

Add this line to your application's Gemfile:

gem 'spotifiery'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spotifiery

Usage

Using it is very simple:

There are three "searchable items":

  • Track
  • Album
  • Artist

To search for a track you can do:

$ Spotifiery::Searchable::Track.find(:q => 'Stairway to Heaven')

Which will return a SearchResult containing tracks called "Stairway to Heaven".

It accepts the same params as the spotify API so if you want to look for the page 2 of search results you should do:

$ Spotifiery::Searchable::Track.find(:q => 'Stairway to Heaven', :page => 2)

A find will return a SearchResult object which contains metadata about the query performed like "num_results", "limit", "offset", "page"... and of course the result set, which can be accessed via the results method (if you've searched for tracks you can use the tracks method too, the same applies to albums or artists).

A Searchable contains all the metadata about itself and allows navigation through the API, p.e.: you can ask a track about its artits or about its album.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 10 Mar 2013

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc