Sha256: ea27b6f1da264e8cae9c8a340ee63513162e7ccffebc5973684615bfa782a72a

Contents?: true

Size: 381 Bytes

Versions: 77

Compression:

Stored size: 381 Bytes

Contents

# frozen_string_literal: true

module Onebox
  class Oembed < OpenGraph

    def initialize(response)
      @data = Onebox::Helpers.symbolize_keys(::MultiJson.load(response))

      # never use oembed from WordPress 4.4 (it's broken)
      data.delete(:html) if data[:html] && data[:html]["wp-embedded-content"]
    end

    def html
      get(:html, nil, false)
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
onebox-2.1.7 lib/onebox/oembed.rb
onebox-2.1.6 lib/onebox/oembed.rb
onebox-2.1.5 lib/onebox/oembed.rb
onebox-2.1.4 lib/onebox/oembed.rb
onebox-2.1.3 lib/onebox/oembed.rb
onebox-2.1.2 lib/onebox/oembed.rb
onebox-2.1.1 lib/onebox/oembed.rb
onebox-2.1.0 lib/onebox/oembed.rb
onebox-2.0.2 lib/onebox/oembed.rb
onebox-2.0.1 lib/onebox/oembed.rb
onebox-2.0.0 lib/onebox/oembed.rb
onebox-1.9.30 lib/onebox/oembed.rb
onebox-1.9.29 lib/onebox/oembed.rb
onebox-1.9.28.4 lib/onebox/oembed.rb
onebox-1.9.28.3 lib/onebox/oembed.rb
onebox-1.9.28.2 lib/onebox/oembed.rb
onebox-1.9.28.1 lib/onebox/oembed.rb
onebox-1.9.28 lib/onebox/oembed.rb
onebox-1.9.27.2 lib/onebox/oembed.rb
onebox-1.9.27.1 lib/onebox/oembed.rb