A Dashing widget to show the total number of plays on your Soundcloud account.
https://github.com/soundcloud/soundcloud-ruby
Add it to your gemfile:
gem 'soundcloud'
And run bundle install
The client IDs are all in ENV variables too. To get these to work, just add the [https://github.com/bkeepers/dotenv](Dotenv gem) to your gemfile, run Bundler and then add:
require 'dotenv'
Dotenv.load
To your config.ru
file.
This job uses the default Number
widget. Just add something like:
<li data-row="1" data-col="2" data-sizex="1" data-sizey="1">
<div data-id="soundcloud-listens" data-view="Number" data-unordered="true" data-title="Listens on Soundcloud"></div>
</li>
To your dashboard layout file, and then copy the soundcloud-listens.rb
file to your jobs folder.
Assuming you've got Dotenv
set up, just add the following to a .env
file in your project folder:
SOUNDCLOUD_CLIENT_ID='YOUR_CLIENT_ID'
SOUNDCLOUD_SECRET='YOUR_CLIENT_SECRET'
SOUNDCLOUD_USERNAME='YOUR_SOUNDCLOUD_USERNAME'
SOUNDCLOUD_PASSWORD='YOUR_SOUNDCLOUD_PASSWORD'