Class: Onebox::Engine::TwitchClipsOnebox

Inherits:
Object
  • Object
show all
Includes:
Mixins::TwitchOnebox
Defined in:
lib/onebox/engine/twitch_clips_onebox.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixins::TwitchOnebox

included

Class Method Details

.twitch_regexpObject


5
6
7
# File 'lib/onebox/engine/twitch_clips_onebox.rb', line 5

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

Instance Method Details

#base_urlObject


14
15
16
# File 'lib/onebox/engine/twitch_clips_onebox.rb', line 14

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

#query_paramsObject


10
11
12
# File 'lib/onebox/engine/twitch_clips_onebox.rb', line 10

def query_params
  "clip=#{twitch_id}"
end