Class: TableauServerClient::Resources::Schedule

Inherits:
Resource
  • Object
show all
Defined in:
lib/tableau_server_client/resources/schedule.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Resource

attr_reader, attributes, #attributes, #delete!, extract_attributes, extract_site_path, #initialize, location, #location, #path, resource_name, #site_path

Methods included from TableauServerClient::RequestBuilder

#build_request

Constructor Details

This class inherits a constructor from TableauServerClient::Resources::Resource

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def created_at
  @created_at
end

#frequencyObject (readonly)

Returns the value of attribute frequency.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def frequency
  @frequency
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def name
  @name
end

#next_run_atObject (readonly)

Returns the value of attribute next_run_at.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def next_run_at
  @next_run_at
end

#priorityObject (readonly)

Returns the value of attribute priority.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def priority
  @priority
end

#stateObject (readonly)

Returns the value of attribute state.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def state
  @state
end

#typeObject (readonly)

Returns the value of attribute type.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def type
  @type
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



8
9
10
# File 'lib/tableau_server_client/resources/schedule.rb', line 8

def updated_at
  @updated_at
end

Class Method Details

.from_collection_response(client, path, xml) ⇒ Object



15
16
17
18
19
20
# File 'lib/tableau_server_client/resources/schedule.rb', line 15

def self.from_collection_response(client, path, xml)
  xml.xpath("//xmlns:schedules/xmlns:schedule").each do |s|
    id = s.xpath("//xmlns:schedule/@id")[0].value
    yield from_response(client, path, s)
  end
end

.from_response(client, path, xml) ⇒ Object



10
11
12
13
# File 'lib/tableau_server_client/resources/schedule.rb', line 10

def self.from_response(client, path, xml)
  attrs = extract_attributes(xml)
  new(client, path, attrs)
end