class TableauServerClient::Resources::ExtractRefresh
Attributes
consecutive_failed_count[R]
id[R]
priority[R]
type[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/extract_refresh.rb, line 20 def self.from_collection_response(client, path, xml) xml.xpath("//xmlns:tasks/xmlns:task/xmlns:extractRefresh").each do |s| id = s.xpath("@id").first.value yield from_response(client, "#{path}/#{id}", s) end end
from_response(client, path, xml)
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 12 def self.from_response(client, path, xml) attrs = extract_attributes(xml) attrs['schedule_id'] = xml.xpath("xmlns:schedule/@id").first.value attrs['workbook_id'] = xml.xpath("xmlns:workbook/@id").first&.value attrs['datasource_id'] = xml.xpath("xmlns:datasource/@id").first&.value new(client, path, attrs) end
plural_resource_name()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 27 def self.plural_resource_name "extractRefreshes" end
Public Instance Methods
datasource()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 51 def datasource @client.get_collection(Datasource.location(site_path)).find {|d| d.id == datasource_id } end
datasource_id()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 39 def datasource_id @datasource_id end
delete!()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 61 def delete! resp = @client.delete(self) end
run_now()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 55 def run_now resp = @client.create(self, path: "#{path}/runNow", request: build_request {}) job_id = resp.xpath("//xmlns:job/@id").first.value Job.from_response(@client, Job.location(site_path, id = job_id).path, resp) end
schedule()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 43 def schedule @client.get_collection(Resources::Schedule.location(nil)).find {|s| s.id == schedule_id } end
schedule_id()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 31 def schedule_id @schedule_id end
workbook()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 47 def workbook @client.get_collection(Workbook.location(site_path)).find {|w| w.id == workbook_id } end
workbook_id()
click to toggle source
# File lib/tableau_server_client/resources/extract_refresh.rb, line 35 def workbook_id @workbook_id end