This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/lib/onebox/engine/twitch_video_onebox.rb
2023-01-09 12:10:19 +00:00

16 lines
297 B
Ruby

# frozen_string_literal: true
require_relative "../mixins/twitch_onebox"
class Onebox::Engine::TwitchVideoOnebox
def self.twitch_regexp
%r{^https?://(?:www\.)?twitch\.tv/videos/([0-9]+)}
end
include Onebox::Mixins::TwitchOnebox
def query_params
"video=v#{twitch_id}"
end
end