Permalink
Browse files

Merge pull request #7 from tdtds/analytics

add simple code for google analytics client. ありがとう!
  • Loading branch information...
2 parents 8b0706a + 83174ef commit 6de534f0dd45ed49e4cb1bfb692dd0929d2db9f8 @tokumine committed Apr 6, 2012
Showing with 31 additions and 0 deletions.
  1. +1 −0 gdata_19.gemspec
  2. +1 −0 lib/gdata/client.rb
  3. +29 −0 lib/gdata/client/analytics.rb
View
@@ -233,6 +233,7 @@ Gem::Specification.new do |s|
"lib/gdata/auth/authsub.rb",
"lib/gdata/auth/clientlogin.rb",
"lib/gdata/client.rb",
+ "lib/gdata/client/analytics.rb",
"lib/gdata/client/apps.rb",
"lib/gdata/client/base.rb",
"lib/gdata/client/blogger.rb",
View
@@ -15,6 +15,7 @@
require 'gdata/client/base'
require 'gdata/client/apps'
+require 'gdata/client/analytics'
require 'gdata/client/blogger'
require 'gdata/client/booksearch'
require 'gdata/client/calendar'
@@ -0,0 +1,29 @@
+# encoding: UTF-8
+# Copyright (C) 2008 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+module GData
+ module Client
+
+ # Client class to wrap working with the Analytics API.
+ class Analytics < Base
+
+ def initialize(options = {})
+ options[:clientlogin_service] ||= 'analytics'
+ options[:authsub_scope] ||= 'https://www.google.com/analytics/feeds/'
+ super(options)
+ end
+ end
+ end
+end

0 comments on commit 6de534f

Please sign in to comment.