# frozen_string_literal: true require_relative "./opengraph_image" module Onebox module Engine class FlickrOnebox include Engine include StandardEmbed matches_domain("www.flickr.com") always_https def self.matches_path(path) path.start_with?("/photos/") end def to_html og = get_opengraph return album_html(og) if og.url =~ %r{/sets/} return image_html(og) if !og.image.nil? nil end private def album_html(og) escaped_url = ::Onebox::Helpers.normalize_url_for_output(url) album_title = "[Album] #{og.title}" <<-HTML
HTML end def image_html(og) escaped_url = ::Onebox::Helpers.normalize_url_for_output(url) <<-HTML