Sha256: 0fbbdc9aab4d37773861d34c68266ff30a7e826c956ee139db53540652fc6e03

Contents?: true

Size: 410 Bytes

Versions: 21

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

require_relative '../mixins/twitch_onebox'

class Onebox::Engine::TwitchClipsOnebox

  def self.twitch_regexp
    /^https?:\/\/clips\.twitch\.tv\/([a-zA-Z0-9_]+\/?[^#\?\/]+)/
  end
  include Onebox::Mixins::TwitchOnebox

  requires_iframe_origins "https://clips.twitch.tv"

  def query_params
    "clip=#{twitch_id}"
  end

  def base_url
    "clips.twitch.tv/embed?"
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
onebox-2.1.0 lib/onebox/engine/twitch_clips_onebox.rb