getclicky 0.1.beta2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,62 +1,79 @@
1
- = Getclicky API Analytics Library
1
+ # Getclicky API Analytics Library
2
2
 
3
3
  A swiss knife ruby wrapper for Getclicky API Analytics. For more information see: http://getclicky.com/help/api.
4
4
 
5
- == Installation
5
+ ## Installation
6
6
 
7
- gem install getclicky
7
+ ``` ruby
8
+ ## Gemfile for Rails 3, Sinatra, and Merb
9
+ gem 'will_paginate', '~> 3.0'
10
+ ```
8
11
 
9
- == Usage
10
12
 
11
- === Ruby wrapper
13
+ ## Usage
14
+
15
+ ### Ruby wrapper
12
16
 
13
17
  First, you'll need to set up your site_id and sitekey. You can discover this information by accessing settings in your account at http://getclicky.com.
14
18
 
15
- Getclicky.configure do |config|
16
- config.site_id = "your site id here"
17
- config.sitekey = "your site key here"
18
- end
19
+ ``` ruby
20
+ Getclicky.configure do |config|
21
+ config.site_id = "your site id here"
22
+ config.sitekey = "your site key here"
23
+ end
24
+ ```
19
25
 
20
26
  Then you can simply instantiate a new Getclicky::Client object.
21
27
 
22
- getclicky = Getclicky::Client.new
28
+ ``` ruby
29
+ getclicky = Getclicky::Client.new
30
+ ```
23
31
 
24
- === Usage
32
+ ### Usage
25
33
 
26
34
  All types in API are methods here looks, you can find all types http://getclicky.com/help/api:
27
35
 
28
- getClicky.pages()
29
- getClicky.tweets()
30
- getClicky.visitors()
36
+ ``` ruby
37
+ getClicky.pages()
38
+ getClicky.tweets()
39
+ getClicky.visitors()
40
+ ```
31
41
 
32
42
  In each method you can pass optional parameters as a hash looks:
33
43
 
34
- getClicky.visitors(:date => "last-7-days", :daily => 1)
35
- getClicky.item(:date => "last-7-days", :item => "google.com")
36
- getClicky.visitors_list(:domain => "google.com")
44
+ ``` ruby
45
+ getClicky.visitors(:date => "last-7-days", :daily => 1)
46
+ getClicky.item(:date => "last-7-days", :item => "google.com")
47
+ getClicky.visitors_list(:domain => "google.com")
48
+ ```
37
49
 
38
50
  By default getclicky API returns XML as data, but you can change adding :output in parameter like:
39
51
 
40
- ===== JSON
52
+ ##### JSON
41
53
 
42
- getClicky.visitors(:output => :json, :date => "last-7-days", :daily => 1)
54
+ ``` ruby
55
+ getClicky.visitors(:output => :json, :date => "last-7-days", :daily => 1)
56
+ ```
43
57
 
44
- ===== CSV
58
+ ##### CSV
45
59
 
60
+ ``` ruby
46
61
  getClicky.visitors(:output => :csv, :date => "last-7-days", :daily => 1)
62
+ ```
47
63
 
48
- ===== PHP
64
+ ##### PHP
49
65
 
66
+ ``` ruby
50
67
  getClicky.visitors(:output => :php, :date => "last-7-days", :daily => 1)
51
-
68
+ ```
52
69
 
53
70
  This library does't support multiple types yet.
54
71
 
55
- == Roadmap
72
+ ## Roadmap
56
73
 
57
74
  * Multiple types for request
58
75
  * Improve the tests
59
76
 
60
- == Maintainer
77
+ ## Maintainer
61
78
 
62
79
  * Peterson Ferreira (petersonferreiras@gmail.com)
@@ -10,8 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.homepage = "http://github.com/petersonferreira/getclicky"
11
11
  s.summary = %q{Ruby Wrapper for GetClicky API Analytics}
12
12
  s.description = s.summary
13
-
14
- s.add_dependency "activesupport" , "~> 3.0"
13
+
15
14
  s.add_dependency "httparty" , "~> 0.7.8"
16
15
  s.add_development_dependency "rspec" , "~> 2.6"
17
16
  s.add_development_dependency "test_notifier", "~> 0.3"
@@ -1,20 +1,8 @@
1
- # Getclicky API Analytics Ruby Client Library
2
- #
3
- # Allows access to the getclicky.com Analytics API using the ruby programming language.
4
- #
5
- # Copyright (c) 2011+ Peterson Ferreira
6
- # See LICENSE for details
7
- #
8
- require "httparty"
9
- require "active_support/core_ext/object/to_param"
10
- require "active_support/core_ext/object/to_query"
11
- require "active_support/inflector"
12
- require "active_support/core_ext/string/strip"
13
- require "active_support/core_ext/object/blank"
14
-
15
1
  # A Ruby class to call the Getclicky API Analytics.
16
2
  # You might use this if you want to see data of Getclicky in your application.
17
- #
3
+
4
+ require "httparty"
5
+
18
6
  module Getclicky
19
7
  autoload :Client , "getclicky/client"
20
8
  autoload :Request , "getclicky/request"
@@ -10,7 +10,7 @@ module Getclicky
10
10
  end
11
11
 
12
12
  # Handle all HTTP::Get request, wrapping all the logic
13
- #
13
+ #
14
14
  def get
15
15
  response = self.class.get(Getclicky.endpoint, :query => build_params(@type, @params))
16
16
 
@@ -2,7 +2,7 @@ module Getclicky
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = "beta2"
5
+ PATCH = 0
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,30 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getclicky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.beta2
5
- prerelease: 4
4
+ version: 0.1.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Peterson Ferreira
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-17 00:00:00.000000000Z
12
+ date: 2011-08-19 00:00:00.000000000Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: activesupport
16
- requirement: &70272461720840 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '3.0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: *70272461720840
25
14
  - !ruby/object:Gem::Dependency
26
15
  name: httparty
27
- requirement: &70272461720340 !ruby/object:Gem::Requirement
16
+ requirement: &70246881759080 !ruby/object:Gem::Requirement
28
17
  none: false
29
18
  requirements:
30
19
  - - ~>
@@ -32,10 +21,10 @@ dependencies:
32
21
  version: 0.7.8
33
22
  type: :runtime
34
23
  prerelease: false
35
- version_requirements: *70272461720340
24
+ version_requirements: *70246881759080
36
25
  - !ruby/object:Gem::Dependency
37
26
  name: rspec
38
- requirement: &70272461719860 !ruby/object:Gem::Requirement
27
+ requirement: &70246881758560 !ruby/object:Gem::Requirement
39
28
  none: false
40
29
  requirements:
41
30
  - - ~>
@@ -43,10 +32,10 @@ dependencies:
43
32
  version: '2.6'
44
33
  type: :development
45
34
  prerelease: false
46
- version_requirements: *70272461719860
35
+ version_requirements: *70246881758560
47
36
  - !ruby/object:Gem::Dependency
48
37
  name: test_notifier
49
- requirement: &70272461719400 !ruby/object:Gem::Requirement
38
+ requirement: &70246881758080 !ruby/object:Gem::Requirement
50
39
  none: false
51
40
  requirements:
52
41
  - - ~>
@@ -54,10 +43,10 @@ dependencies:
54
43
  version: '0.3'
55
44
  type: :development
56
45
  prerelease: false
57
- version_requirements: *70272461719400
46
+ version_requirements: *70246881758080
58
47
  - !ruby/object:Gem::Dependency
59
48
  name: fakeweb
60
- requirement: &70272461718940 !ruby/object:Gem::Requirement
49
+ requirement: &70246881757460 !ruby/object:Gem::Requirement
61
50
  none: false
62
51
  requirements:
63
52
  - - ~>
@@ -65,10 +54,10 @@ dependencies:
65
54
  version: '1.3'
66
55
  type: :development
67
56
  prerelease: false
68
- version_requirements: *70272461718940
57
+ version_requirements: *70246881757460
69
58
  - !ruby/object:Gem::Dependency
70
59
  name: ruby-debug19
71
- requirement: &70272461718480 !ruby/object:Gem::Requirement
60
+ requirement: &70246881756980 !ruby/object:Gem::Requirement
72
61
  none: false
73
62
  requirements:
74
63
  - - ~>
@@ -76,7 +65,7 @@ dependencies:
76
65
  version: '0.11'
77
66
  type: :development
78
67
  prerelease: false
79
- version_requirements: *70272461718480
68
+ version_requirements: *70246881756980
80
69
  description: Ruby Wrapper for GetClicky API Analytics
81
70
  email:
82
71
  - petersonferreiras@gmail.com
@@ -116,9 +105,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
105
  required_rubygems_version: !ruby/object:Gem::Requirement
117
106
  none: false
118
107
  requirements:
119
- - - ! '>'
108
+ - - ! '>='
120
109
  - !ruby/object:Gem::Version
121
- version: 1.3.1
110
+ version: '0'
122
111
  requirements: []
123
112
  rubyforge_project:
124
113
  rubygems_version: 1.8.8