Module: Legato::Management::Finder

Included in:
Account, AccountSummary, Goal, Profile, Segment, WebProperty
Defined in:
lib/legato/management/finder.rb

Instance Method Summary collapse

Instance Method Details

#all(user, path = default_path) ⇒ Object



8
9
10
11
12
# File 'lib/legato/management/finder.rb', line 8

def all(user, path=default_path)
  query = Legato::Management::Query.new(base_uri + path, self)

  user.request(query).items.map {|item| new(item, user)}
end

#base_uriObject



4
5
6
# File 'lib/legato/management/finder.rb', line 4

def base_uri
  "https://www.googleapis.com/analytics/v3/management"
end

#get(user, path) ⇒ Object



14
15
16
17
18
# File 'lib/legato/management/finder.rb', line 14

def get(user, path)
  query = Legato::Management::Query.new(base_uri + path, self)

  new(user.request(query).data, user)
end