Class: Embedly::Oembed
- Inherits:
-
Object
- Object
- Embedly::Oembed
- Defined in:
- lib/embedly/oembed.rb
Constant Summary collapse
- ENDPOINT_URL =
'/1/oembed'
- ATTRIBUTES =
[ :provider_url, :description, :title, :author_name, :height, :width, :html, :thumbnail_width, :version, :provider_name, :thumbnail_url, :type, :thumbnail_height, :author_url ]
Class Attribute Summary collapse
-
.key ⇒ Object
Returns the value of attribute key.
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
- #configuration ⇒ Object
- #connection ⇒ Object
-
#initialize(options) ⇒ Oembed
constructor
A new instance of Oembed.
- #url ⇒ Object
- #video? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ Oembed
Returns a new instance of Oembed.
34 35 36 |
# File 'lib/embedly/oembed.rb', line 34 def initialize() @options = end |
Class Attribute Details
.key ⇒ Object
Returns the value of attribute key.
29 30 31 |
# File 'lib/embedly/oembed.rb', line 29 def key @key end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
32 33 34 |
# File 'lib/embedly/oembed.rb', line 32 def @options end |
#request ⇒ Object
Returns the value of attribute request.
32 33 34 |
# File 'lib/embedly/oembed.rb', line 32 def request @request end |
Instance Method Details
#configuration ⇒ Object
66 67 68 |
# File 'lib/embedly/oembed.rb', line 66 def configuration Embedly.configuration end |
#connection ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/embedly/oembed.rb', line 58 def connection Faraday.new API_URL do |builder| builder.use Faraday::Response::Mashify builder.use Faraday::Response::ParseJson builder.adapter :net_http end end |
#url ⇒ Object
42 43 44 |
# File 'lib/embedly/oembed.rb', line 42 def url [:url] end |
#video? ⇒ Boolean
38 39 40 |
# File 'lib/embedly/oembed.rb', line 38 def video? true end |