Sha256: 02fb8dbb8c720765430b6186d72565567ae1c41e2bccf73d1e32d4882322eee0

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

require "film_snob/oembed_provider"

class FilmSnob
  class Dailymotion < OembedProvider
    def self.valid_url_patterns
      [
        %r{https?://www.dailymotion.com/video/([\w\d\-_]+)},
        %r{https?://touch.dailymotion.com/video/([\w\d\-_]+)}
      ]
    end

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

    def self.oembed_endpoint
      "http://www.dailymotion.com/services/oembed"
    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/dailymotion.rb
film_snob-1.0.1 lib/film_snob/oembed_providers/dailymotion.rb
film_snob-1.0.0 lib/film_snob/oembed_providers/dailymotion.rb