class TableauServerClient::Resources::View
Attributes
content_url[R]
id[R]
name[R]
owner[W]
workbook_id[R]
Public Class Methods
from_collection_response(client, path, xml) { |from_response(client, "#{path}/#{id}", s)| ... }
click to toggle source
# File lib/tableau_server_client/resources/view.rb, line 18 def self.from_collection_response(client, path, xml) xml.xpath("//xmlns:views/xmlns:view").each do |s| id = s['id'] yield from_response(client, "#{path}/#{id}", s) end end
from_response(client, path, xml)
click to toggle source
# File lib/tableau_server_client/resources/view.rb, line 12 def self.from_response(client, path, xml) attrs = extract_attributes(xml) attrs['workbook_id'] = xml.xpath("xmlns:workbook")[0]['id'] new(client, path, attrs) end
Public Instance Methods
image(query_params: {}, file_path: nil)
click to toggle source
# File lib/tableau_server_client/resources/view.rb, line 37 def image(query_params: {}, file_path: nil) return @image if @iamge @image = client.download_image(location(query_params: query_params), file_path: file_path) @image end
webpage_path()
click to toggle source
# File lib/tableau_server_client/resources/view.rb, line 33 def webpage_path content_url.gsub('/sheets/', '/') end
webpage_url()
click to toggle source
# File lib/tableau_server_client/resources/view.rb, line 29 def webpage_url "#{server_url}#{content}/#/views/#{webpage_path}" end
workbook()
click to toggle source
# File lib/tableau_server_client/resources/view.rb, line 25 def workbook client.get Workbook.location(site_path, workbook_id) end