Class: TableauServerClient::Resources::Connection
- Defined in:
- lib/tableau_server_client/resources/connection.rb
Instance Attribute Summary collapse
-
#embed_password ⇒ Object
Returns the value of attribute embed_password.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#password ⇒ Object
Returns the value of attribute password.
-
#server_address ⇒ Object
readonly
Returns the value of attribute server_address.
-
#server_port ⇒ Object
readonly
Returns the value of attribute server_port.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
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
Methods included from TableauServerClient::RequestBuilder
Constructor Details
This class inherits a constructor from TableauServerClient::Resources::Resource
Instance Attribute Details
#embed_password ⇒ Object
Returns the value of attribute embed_password.
8 9 10 |
# File 'lib/tableau_server_client/resources/connection.rb', line 8 def @embed_password end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/tableau_server_client/resources/connection.rb', line 8 def id @id end |
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/tableau_server_client/resources/connection.rb', line 8 def password @password end |
#server_address ⇒ Object (readonly)
Returns the value of attribute server_address.
8 9 10 |
# File 'lib/tableau_server_client/resources/connection.rb', line 8 def server_address @server_address end |
#server_port ⇒ Object (readonly)
Returns the value of attribute server_port.
8 9 10 |
# File 'lib/tableau_server_client/resources/connection.rb', line 8 def server_port @server_port end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/tableau_server_client/resources/connection.rb', line 8 def type @type end |
#user_name ⇒ Object
Returns the value of attribute user_name.
8 9 10 |
# File 'lib/tableau_server_client/resources/connection.rb', line 8 def user_name @user_name end |
Class Method Details
.from_collection_response(client, path, xml) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/tableau_server_client/resources/connection.rb', line 16 def self.from_collection_response(client, path, xml) xml.xpath("//xmlns:connections/xmlns:connection").each do |s| id = s['id'] yield from_response(client, "#{path}/#{id}", s) end end |
.from_response(client, path, xml) ⇒ Object
11 12 13 14 |
# File 'lib/tableau_server_client/resources/connection.rb', line 11 def self.from_response(client, path, xml) attrs = extract_attributes(xml) new(client, path, attrs) end |
Instance Method Details
#to_request ⇒ Object
23 24 25 26 27 28 |
# File 'lib/tableau_server_client/resources/connection.rb', line 23 def to_request request = build_request {|b| b.connection(serverAddress: server_address, serverPort: server_port, userName: user_name, password: password, embedPassword: ) } end |
#update! ⇒ Object
30 31 32 |
# File 'lib/tableau_server_client/resources/connection.rb', line 30 def update! @client.update self end |