lib/caboodle/kits/soundcloud/soundcloud.rb in caboodle-0.2.14 vs lib/caboodle/kits/soundcloud/soundcloud.rb in caboodle-0.2.15
- old
+ new
@@ -1,29 +1,28 @@
module Caboodle
class Soundcloud < Caboodle::Kit
description "Displays a search of soundcloud as embedded players on a single page."
-
- menu "Mixes", "/mixes" do
- @title = "Mixes"
+
+ menu "Music" do
@mixes = SoundcloudAPI.sets
- haml :soundcloud
+ haml :music
end
required [:soundcloud_query]
credit "http://soundcloud.com"
end
class SoundcloudAPI < Weary::Base
- declare "sets" do |r|
- r.url = "http://api.soundcloud.com/playlists?q=#{Site.soundcloud_query}"
- r.via = :get
- r.headers = {'Accept' => 'application/xml'}
- end
-
- def self.sets
- Hashie::Mash.new(SoundcloudAPI.new.sets.perform_sleepily.parse).playlists
- end
+ declare "sets" do |r|
+ r.url = "http://api.soundcloud.com/playlists?q=#{Site.soundcloud_query}"
+ r.via = :get
+ r.headers = {'Accept' => 'application/xml'}
+ end
+
+ def self.sets
+ Hashie::Mash.new(SoundcloudAPI.new.sets.perform_sleepily.parse).playlists
+ end
end
end
\ No newline at end of file