Module: Statcounter

Defined in:
lib/statcounter.rb,
lib/statcounter/client.rb,
lib/statcounter/errors.rb,
lib/statcounter/version.rb,
lib/statcounter/projects.rb,
lib/statcounter/configuration.rb,
lib/statcounter/summary_stats.rb,
lib/statcounter/params_encoder.rb

Defined Under Namespace

Classes: Client, Configuration, Error, ParamsEncoder, Projects, SummaryStats

Constant Summary collapse

API_URL =
'http://api.statcounter.com/'.freeze
VERSION =
'1.0.2'.freeze

Class Method Summary collapse

Class Method Details

.clientObject



22
23
24
# File 'lib/statcounter.rb', line 22

def client
  @client ||= Client.new
end

.configObject



18
19
20
# File 'lib/statcounter.rb', line 18

def config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



14
15
16
# File 'lib/statcounter.rb', line 14

def configure
  yield(config)
end

.default_credentialsObject



26
27
28
# File 'lib/statcounter.rb', line 26

def default_credentials
  @default_credentials ||= { username: config.username, secret: config.secret }
end