Class: GoogleApi::Ga::Webproperty
Instance Attribute Summary collapse
Attributes inherited from Management
#created, #id, #name, #updated
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Management
#camelize
Constructor Details
#initialize(webproperty) ⇒ Webproperty
Returns a new instance of Webproperty.
8
9
10
|
# File 'lib/google_api/ga/management/webproperty.rb', line 8
def initialize(webproperty)
set(webproperty)
end
|
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
5
6
7
|
# File 'lib/google_api/ga/management/webproperty.rb', line 5
def account_id
@account_id
end
|
#website_url ⇒ Object
Returns the value of attribute website_url.
6
7
8
|
# File 'lib/google_api/ga/management/webproperty.rb', line 6
def website_url
@website_url
end
|
Class Method Details
.all(account_id = '~all', webproperty_id = '~all') ⇒ Object
12
13
14
|
# File 'lib/google_api/ga/management/webproperty.rb', line 12
def self.all(account_id = '~all', webproperty_id = '~all')
get({ accountId: account_id, webPropertyId: webproperty_id }).map { |webproperty| Webproperty.new(webproperty) }
end
|
.find(webproperty_id) ⇒ Object
16
17
18
|
# File 'lib/google_api/ga/management/webproperty.rb', line 16
def self.find(webproperty_id)
all('~all', webproperty_id).first
end
|
Instance Method Details
#account ⇒ Object
29
30
31
|
# File 'lib/google_api/ga/management/webproperty.rb', line 29
def account
@account ||= Account.find(@account_id)
end
|
#profiles ⇒ Object
33
34
35
|
# File 'lib/google_api/ga/management/webproperty.rb', line 33
def profiles
@profiles ||= Profile.all(@account_id, @id)
end
|
#refresh ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/google_api/ga/management/webproperty.rb', line 20
def refresh
@account = nil
@profiles = nil
set( Webproperty.get({ accountId: @account_id, webPropertyId: @id }).first )
return true
end
|