Sha256: bc16786fb593c7ebeea475ad05245ac1931f88c7b6dbe8bc028eb5d959c7c63f

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

require "film_snob/video_site"

class FilmSnob
  class Soundcloud < VideoSite
    def initialize(url, options = {})
      super(url, options.merge(:format => :json))
    end

    def self.valid_url_patterns
      [
        %r{https?://soundcloud.com/([^/]+/[^?]+)},
        %r{https?://m.soundcloud.com/([^/]+/[^?]+)}
      ]
    end

    def self.oembed_endpoint
      "https://soundcloud.com/oembed"
    end

    def clean_url
      @clean_url ||= "https://soundcloud.com/#{id}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
film_snob-0.6.5 lib/film_snob/video_sites/soundcloud.rb