Add basic OEmbed provider API, fix #247
This commit is contained in:
parent
14bd46946d
commit
6ff93845d5
7 changed files with 65 additions and 0 deletions
14
app/views/api/oembed/show.json.rabl
Normal file
14
app/views/api/oembed/show.json.rabl
Normal file
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
object @stream_entry
|
||||
|
||||
node(:type) { 'rich' }
|
||||
node(:version) { '1.0' }
|
||||
node(:title, &:title)
|
||||
node(:author_name) { |entry| entry.account.display_name.blank? ? entry.account.username : entry.account.display_name }
|
||||
node(:author_url) { |entry| account_url(entry.account) }
|
||||
node(:provider_name) { Rails.configuration.x.local_domain }
|
||||
node(:provider_url) { root_url }
|
||||
node(:cache_age) { 86_400 }
|
||||
node(:html, &:content)
|
||||
node(:width) { @width }
|
||||
node(:height) { @height }
|
Loading…
Add table
Add a link
Reference in a new issue