From 6ff93845d55eb34fc8beceb0c2dde06860c1eb47 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 30 Nov 2016 23:01:03 +0100 Subject: Add basic OEmbed provider API, fix #247 --- app/views/api/oembed/show.json.rabl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/views/api/oembed/show.json.rabl (limited to 'app/views/api') diff --git a/app/views/api/oembed/show.json.rabl b/app/views/api/oembed/show.json.rabl new file mode 100644 index 000000000..e035bc13c --- /dev/null +++ b/app/views/api/oembed/show.json.rabl @@ -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 } -- cgit