Sha256: 2143a5630bafb4676ca291ea442cece41abff1e5581e52134384923532bfe516

Contents?: true

Size: 408 Bytes

Versions: 7

Compression:

Stored size: 408 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

7 entries across 7 versions & 1 rubygems

Version Path
onebox-2.2.19 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.18 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.17 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.16 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.15 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.14 lib/onebox/engine/twitch_clips_onebox.rb
onebox-2.2.13 lib/onebox/engine/twitch_clips_onebox.rb