Project

sounddrop

0.0
No commit activity in last 3 years
No release in over 3 years
A gem that provides audio and track information about a Soundcloud song given a URL
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.5
~> 1.7
~> 0.10

Runtime

~> 1.0
 Project Readme

SoundDrop

Gem Version

A gem that exposes various track information about a Soundcloud song by providing a URL. This gem is very limited in comparison to the original soundcloud API gem and provides no real advantage other than getting a media download URL.

Installation

Add this line to your application's Gemfile:

gem 'sounddrop'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sounddrop

Usage

Being that we're only considering crude track information, there really is no need to do any sort of user authentication. All you really need is a CLIENT_ID and CLIENT_SECRET.

How to get said keys? Easy! Head over to the [Soundcloud developers site] (developers.soundcloud.com) and register your application!

Everything is accessed via a Drop object which is created using a Client object.

client = SoundDrop::Client.new(
  client_id: CLIENT_ID,
  client_secret: CLIENT_SECRET
  ) #=> SoundDrop::Client

You can also specify :username and :password if you'd like.

Now for getting track information:

track_url = 'https://soundcloud.com/armadacaptivating/id-everytime-you-smile'
drop = client.get_drop(track_url) #=> SoundDrop::Drop

Let's get some useful data:

id = drop.id #=> Gets the track id
title = drop.title #=> Gets the track title
genre = drop.genre #=> Gets the track genre
media_url = drop.media_url #=> Gets the track download URL

Contributing

  1. Fork it ( https://github.com/Alexanderbez/sounddrop/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request