Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.519 kb
module Legato
module Management
module Finder
def base_uri
"https://www.googleapis.com/analytics/v3/management"
end
def all(user, path=default_path)
uri = if user.api_key
# oauth + api_key
base_uri + path + "?key=#{user.api_key}"
else
# oauth 2
base_uri + path
end
json = user.access_token.get(base_uri + path).body
MultiJson.decode(json)['items'].map {|item| new(item, user)}
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.