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.2.12 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.11 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.10 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.9 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.8 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.6 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.5 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.4 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.2 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.1 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.0 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.9 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.8 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.7 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.6 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.5 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.4 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.3 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.2 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.1.1 lib/onebox/engine/twitch_clips_onebox.rb