Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b3327a4c33
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 0.604 kb
module Garb
module Management
class Feed
BASE_URL = "https://www.google.com/analytics/feeds/datasources/ga"
attr_reader :request
def initialize(session, path)
@request = DataRequest.new(session, BASE_URL+path)
end
def parsed_response
@parsed_response ||= Crack::XML.parse(response.body)
end
def entries
# possible to have nil entries, yuck
parsed_response ? Array(parsed_response['feed']['entry']).flatten.compact : []
end
def response
@response ||= request.send_request
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.