class TableauServerClient::Resources::Site

Attributes

admin_mode[R]
content_url[R]
id[R]
name[R]
state[R]
storage_quota[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/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) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 17
def self.from_response(client, path, xml)
  attrs = extract_attributes(xml)
  new(client, path, attrs)
end

Public Instance Methods

datasource(id) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 33
def datasource(id)
  @client.get Datasource.location(path, id)
end
datasources(filter: []) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 29
def datasources(filter: [])
  @client.get_collection Datasource.location(path, filter: filter)
end
extract_refreshes() click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 77
def extract_refreshes
  @client.get_collection ExtractRefresh.location("#{path}/tasks")
end
groups(filter: []) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 81
def groups(filter: [])
  @client.get_collection Group.location(path, filter: filter)
end
project(id) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 65
def project(id)
  projects.find { |p| p.id == id }
end
projects(filter: []) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 61
def projects(filter: [])
  @client.get_collection Project.location(path, filter: filter)
end
subscription(id) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 73
def subscription(id)
  subscriptions.find {|s| s.id = id }
end
subscriptions() click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 69
def subscriptions
  @client.get_collection Subscription.location(path)
end
user(id) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 57
def user(id)
  @client.get User.location(path, id)
end
users(filter: []) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 53
def users(filter: [])
  @client.get_collection User.location(path, filter: filter)
end
view(id) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 49
def view(id)
  @client.get View.location(path, id)
end
views(filter: []) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 45
def views(filter: [])
  @client.get_collection View.location(path, filter: filter)
end
workbook(id) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 41
def workbook(id)
  @client.get Workbook.location(path, id)
end
workbooks(filter: []) click to toggle source
# File lib/tableau_server_client/resources/site.rb, line 37
def workbooks(filter: [])
  @client.get_collection Workbook.location(path, filter: filter)
end