lib/garb/management/profile.rb in garb-0.8.3 vs lib/garb/management/profile.rb in garb-0.8.4
- old
+ new
@@ -3,11 +3,11 @@
class Profile
include ProfileReports
attr_reader :session, :path
- attr_reader :id, :title, :account_id, :web_property_id
+ attr_reader :id, :table_id, :title, :account_id, :web_property_id
def self.all(session = Session, path = '/accounts/~all/webproperties/~all/profiles')
feed = Feed.new(session, path)
feed.entries.map {|entry| new(entry, session)}
end
@@ -21,13 +21,14 @@
end
def initialize(entry, session)
@session = session
@path = Garb.parse_link(entry, "self").gsub(Feed::BASE_URL, '')
- @title = entry['title'].gsub('Google Analytics Profile ', '')
properties = Garb.parse_properties(entry)
@id = properties['profile_id']
+ @table_id = properties['table_id']
+ @title = properties['profile_name']
@account_id = properties['account_id']
@web_property_id = properties['web_property_id']
end
# def goals