Sha256: 604581235cb6e09b8f4c250dd6dd4bd06273bef3085db75f97cae4c7a1e9821c

Contents?: true

Size: 367 Bytes

Versions: 3

Compression:

Stored size: 367 Bytes

Contents

require "film_snob/oembed_provider"

class FilmSnob
  class Hulu < OembedProvider
    def self.valid_url_patterns
      [
        %r{https?://(?:(?:www).)?hulu.com/watch/(\d+)}
      ]
    end

    def self.oembed_endpoint
      "http://www.hulu.com/api/oembed.json"
    end

    def clean_url
      @clean_url ||= "http://www.hulu.com/watch/#{id}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
film_snob-2.0.0 lib/film_snob/oembed_providers/hulu.rb
film_snob-1.0.1 lib/film_snob/oembed_providers/hulu.rb
film_snob-1.0.0 lib/film_snob/oembed_providers/hulu.rb