Sha256: a758a9cfc2ba8f227510828f4688ac0783b5e618322688c800bd0ea56ee1816f
Contents?: true
Size: 598 Bytes
Versions: 4
Compression:
Stored size: 598 Bytes
Contents
module Garb class AccountFeedRequest URL = "https://www.google.com/analytics/feeds/accounts/default" def initialize(session = Session) @request = DataRequest.new(session, URL) end def response @response ||= @request.send_request end def parsed_response @parsed_response ||= Crack::XML.parse(response.body) end def entries parsed_response ? Array(parsed_response['feed']['entry']).flatten.compact : [] end def segments parsed_response ? Array(parsed_response['feed']['dxp:segment']).flatten.compact : [] end end end
Version data entries
4 entries across 4 versions & 3 rubygems