Class: TableauServerClient::Resources::Site
- Inherits:
-
Resource
- Object
- Resource
- TableauServerClient::Resources::Site
show all
- Defined in:
- lib/tableau_server_client/resources/site.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Resource
attr_reader, attributes, #attributes, #delete!, extract_attributes, extract_site_path, #initialize, location, #location, #path, plural_resource_name, resource_name, #server_url, #site_id, #site_path
#build_request
Instance Attribute Details
#admin_mode ⇒ Object
Returns the value of attribute admin_mode.
14
15
16
|
# File 'lib/tableau_server_client/resources/site.rb', line 14
def admin_mode
@admin_mode
end
|
#content_url ⇒ Object
Returns the value of attribute content_url.
14
15
16
|
# File 'lib/tableau_server_client/resources/site.rb', line 14
def content_url
@content_url
end
|
#id ⇒ Object
Returns the value of attribute id.
14
15
16
|
# File 'lib/tableau_server_client/resources/site.rb', line 14
def id
@id
end
|
#name ⇒ Object
Returns the value of attribute name.
14
15
16
|
# File 'lib/tableau_server_client/resources/site.rb', line 14
def name
@name
end
|
#state ⇒ Object
Returns the value of attribute state.
14
15
16
|
# File 'lib/tableau_server_client/resources/site.rb', line 14
def state
@state
end
|
#storage_quota ⇒ Object
Returns the value of attribute storage_quota.
14
15
16
|
# File 'lib/tableau_server_client/resources/site.rb', line 14
def storage_quota
@storage_quota
end
|
Class Method Details
.from_collection_response(client, path, xml) ⇒ Object
21
22
23
24
25
26
|
# File 'lib/tableau_server_client/resources/site.rb', line 21
def self.from_collection_response(client, path, xml)
xml.xpath("//xmlns:sites/xmlns:site").each do |s|
id = s['id']
yield from_response(client, "#{path}/#{id}", s)
end
end
|
.from_response(client, path, xml) ⇒ Object
16
17
18
19
|
# File 'lib/tableau_server_client/resources/site.rb', line 16
def self.from_response(client, path, xml)
attrs = (xml)
new(client, path, attrs)
end
|
Instance Method Details
#datasource(id) ⇒ Object
32
33
34
|
# File 'lib/tableau_server_client/resources/site.rb', line 32
def datasource(id)
@client.get Datasource.location(path, id)
end
|
#datasources(filter: []) ⇒ Object
28
29
30
|
# File 'lib/tableau_server_client/resources/site.rb', line 28
def datasources(filter: [])
@client.get_collection Datasource.location(path, filter: filter)
end
|
76
77
78
|
# File 'lib/tableau_server_client/resources/site.rb', line 76
def
@client.get_collection ExtractRefresh.location("#{path}/tasks")
end
|
#project(id) ⇒ Object
64
65
66
|
# File 'lib/tableau_server_client/resources/site.rb', line 64
def project(id)
projects.find { |p| p.id == id }
end
|
#projects(filter: []) ⇒ Object
60
61
62
|
# File 'lib/tableau_server_client/resources/site.rb', line 60
def projects(filter: [])
@client.get_collection Project.location(path, filter: filter)
end
|
#subscription(id) ⇒ Object
72
73
74
|
# File 'lib/tableau_server_client/resources/site.rb', line 72
def subscription(id)
subscriptions.find {|s| s.id = id }
end
|
#subscriptions ⇒ Object
68
69
70
|
# File 'lib/tableau_server_client/resources/site.rb', line 68
def subscriptions
@client.get_collection Subscription.location(path)
end
|
#user(id) ⇒ Object
56
57
58
|
# File 'lib/tableau_server_client/resources/site.rb', line 56
def user(id)
@client.get User.location(path, id)
end
|
#users(filter: []) ⇒ Object
52
53
54
|
# File 'lib/tableau_server_client/resources/site.rb', line 52
def users(filter: [])
@client.get_collection User.location(path, filter: filter)
end
|
#view(id) ⇒ Object
48
49
50
|
# File 'lib/tableau_server_client/resources/site.rb', line 48
def view(id)
@client.get View.location(path, id)
end
|
#views(filter: []) ⇒ Object
44
45
46
|
# File 'lib/tableau_server_client/resources/site.rb', line 44
def views(filter: [])
@client.get_collection View.location(path, filter: filter)
end
|
#workbook(id) ⇒ Object
40
41
42
|
# File 'lib/tableau_server_client/resources/site.rb', line 40
def workbook(id)
@client.get Workbook.location(path, id)
end
|
#workbooks(filter: []) ⇒ Object
36
37
38
|
# File 'lib/tableau_server_client/resources/site.rb', line 36
def workbooks(filter: [])
@client.get_collection Workbook.location(path, filter: filter)
end
|