We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to have a method that returns the content type of the page? In oembed there is a key that returns this.
Example { title: 'example', type: 'video', url: ... }
{ title: 'example', type: 'video', url: ... }
The text was updated successfully, but these errors were encountered:
sounds reasonable, we could fallback to use the content-type from the http request maybe?
Sorry, something went wrong.
Yea, ruby-oembed gem has an implementation in that sense that you said.
https://github.com/ruby-oembed/ruby-oembed/blob/master/lib/oembed/response.rb#L29
The question is to have the URL type in to_json and boolean methods to check for themselves, type @object.video? @object.image?
@object.video?
@object.image?
This will help, for example, render specific views for each case.
@gottfrois You could put another hash with the request information?
Like this:
{ request: { content-type: ..., ... }, object: { url: '...', title: '...', } }
This alternative hash could be returned by user option for example: generate (url, http_headers: true)
generate (url, http_headers: true)
No branches or pull requests
Is it possible to have a method that returns the content type of the page? In oembed there is a key that returns this.
Example
{ title: 'example', type: 'video', url: ... }
The text was updated successfully, but these errors were encountered: