Sha256: 21659f0b2f417083c6cf58cea6cefc367fa45cee2f54e1edcb93c5c091becb8f

Contents?: true

Size: 645 Bytes

Versions: 16

Compression:

Stored size: 645 Bytes

Contents

module Caboodle
  class Soundcloud < Caboodle::Kit
    description "Displays a search of soundcloud as embedded players on a single page."

    menu "Music" do
      @mixes = SoundcloudAPI.sets
      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

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
caboodle-0.3.0 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.30 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.29 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.28 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.27 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.26 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.25 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.24 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.23 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.22 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.21 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.20 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.19 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.18 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.16 lib/caboodle/kits/soundcloud/soundcloud.rb
caboodle-0.2.15 lib/caboodle/kits/soundcloud/soundcloud.rb