Sha256: be2d6d174a99b3f4424e15e1d0d9bc74be18d8e65b1badb79fe7f1006a77bc32

Contents?: true

Size: 853 Bytes

Versions: 2

Compression:

Stored size: 853 Bytes

Contents

module Garb
  module Management
    class Profile

      include ProfileReports
      include PathAttribute
      extend Attributes

      attr_reader :session
      ga_attribute :id, :name, :account_id, :web_property_id, :website_url

      def self.all(session = Session, path = '/accounts/~all/webproperties/~all/profiles')
        feed = Feed.new(session, path)
        feed.entries.map { |entry| new(entry, session) }
      end

      def self.for_account(account)
        all(account.session, account.path + '/webproperties/~all/profiles')
      end

      def self.for_web_property(web_property)
        all(web_property.session, web_property.path + '/profiles')
      end

      def initialize(entry, session)
        @entry = entry
        @session = session
      end

      def goals
        Goal.for_profile self
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
garb-0.9.8 lib/garb/management/profile.rb
garb-0.9.7 lib/garb/management/profile.rb