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.
15
16
17
|
# File 'lib/tableau_server_client/resources/site.rb', line 15
def admin_mode
@admin_mode
end
|
#content_url ⇒ Object
Returns the value of attribute content_url.
15
16
17
|
# File 'lib/tableau_server_client/resources/site.rb', line 15
def content_url
@content_url
end
|
#id ⇒ Object
Returns the value of attribute id.
15
16
17
|
# File 'lib/tableau_server_client/resources/site.rb', line 15
def id
@id
end
|
#name ⇒ Object
Returns the value of attribute name.
15
16
17
|
# File 'lib/tableau_server_client/resources/site.rb', line 15
def name
@name
end
|
#state ⇒ Object
Returns the value of attribute state.
15
16
17
|
# File 'lib/tableau_server_client/resources/site.rb', line 15
def state
@state
end
|
#storage_quota ⇒ Object
Returns the value of attribute storage_quota.
15
16
17
|
# File 'lib/tableau_server_client/resources/site.rb', line 15
def storage_quota
@storage_quota
end
|
Class Method Details
.from_collection_response(client, path, xml) ⇒ Object
22
23
24
25
26
27
|
# File 'lib/tableau_server_client/resources/site.rb', line 22
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
17
18
19
20
|
# File 'lib/tableau_server_client/resources/site.rb', line 17
def self.from_response(client, path, xml)
attrs = (xml)
new(client, path, attrs)
end
|
Instance Method Details
#datasource(id) ⇒ Object
33
34
35
|
# File 'lib/tableau_server_client/resources/site.rb', line 33
def datasource(id)
@client.get Datasource.location(path, id)
end
|
#datasources(filter: []) ⇒ Object
29
30
31
|
# File 'lib/tableau_server_client/resources/site.rb', line 29
def datasources(filter: [])
@client.get_collection Datasource.location(path, filter: filter)
end
|
77
78
79
|
# File 'lib/tableau_server_client/resources/site.rb', line 77
def
@client.get_collection ExtractRefresh.location("#{path}/tasks")
end
|
#groups(filter: []) ⇒ Object
81
82
83
|
# File 'lib/tableau_server_client/resources/site.rb', line 81
def groups(filter: [])
@client.get_collection Group.location(path, filter: filter)
end
|
#project(id) ⇒ Object
65
66
67
|
# File 'lib/tableau_server_client/resources/site.rb', line 65
def project(id)
projects.find { |p| p.id == id }
end
|
#projects(filter: []) ⇒ Object
61
62
63
|
# File 'lib/tableau_server_client/resources/site.rb', line 61
def projects(filter: [])
@client.get_collection Project.location(path, filter: filter)
end
|
#subscription(id) ⇒ Object
73
74
75
|
# File 'lib/tableau_server_client/resources/site.rb', line 73
def subscription(id)
subscriptions.find {|s| s.id = id }
end
|
#subscriptions ⇒ Object
69
70
71
|
# File 'lib/tableau_server_client/resources/site.rb', line 69
def subscriptions
@client.get_collection Subscription.location(path)
end
|
#user(id) ⇒ Object
57
58
59
|
# File 'lib/tableau_server_client/resources/site.rb', line 57
def user(id)
@client.get User.location(path, id)
end
|
#users(filter: []) ⇒ Object
53
54
55
|
# File 'lib/tableau_server_client/resources/site.rb', line 53
def users(filter: [])
@client.get_collection User.location(path, filter: filter)
end
|
#view(id) ⇒ Object
49
50
51
|
# File 'lib/tableau_server_client/resources/site.rb', line 49
def view(id)
@client.get View.location(path, id)
end
|
#views(filter: []) ⇒ Object
45
46
47
|
# File 'lib/tableau_server_client/resources/site.rb', line 45
def views(filter: [])
@client.get_collection View.location(path, filter: filter)
end
|
#workbook(id) ⇒ Object
41
42
43
|
# File 'lib/tableau_server_client/resources/site.rb', line 41
def workbook(id)
@client.get Workbook.location(path, id)
end
|
#workbooks(filter: []) ⇒ Object
37
38
39
|
# File 'lib/tableau_server_client/resources/site.rb', line 37
def workbooks(filter: [])
@client.get_collection Workbook.location(path, filter: filter)
end
|