Class: Analytics::WebProperty

Inherits:
Object
  • Object
show all
Defined in:
lib/analytics/web_property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts, access_token) ⇒ WebProperty



5
6
7
8
9
10
11
# File 'lib/analytics/web_property.rb', line 5

def initialize(opts, access_token)
  @access_token = access_token
  @id = opts.fetch("id")
  @name = opts.fetch("name", "Not found")
  @account_id = opts.fetch("accountId")
  @url = opts.fetch("websiteUrl", "Not found")
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



3
4
5
# File 'lib/analytics/web_property.rb', line 3

def 
  @account_id
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/analytics/web_property.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/analytics/web_property.rb', line 3

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/analytics/web_property.rb', line 3

def url
  @url
end

Instance Method Details

#profilesObject



13
14
15
# File 'lib/analytics/web_property.rb', line 13

def profiles
  @profiles ||= request_profiles
end