12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/oembed_proxy/google_spreadsheet.rb', line 12
def get_data(url, _other_params = {})
return nil unless handles_url? url
oembed = {}
oembed['type'] = 'rich'
oembed['version'] = '1.0'
oembed['provider_name'] = 'Google Apps Spreadsheets'
oembed['provider_url'] = 'https://docs.google.com/spreadsheet/'
oembed['html'] = '<iframe class="google-docs spreadsheet" width="100%" height="500" frameborder="0" scrolling="yes" marginheight="0" marginwidth="0" src="' + url + '&output=html"></iframe>'
oembed['width'] = 500
oembed['height'] = 500
oembed
end
|