Module: Piwik::ApiScope

Included in:
Base
Defined in:
lib/piwik/api_scope.rb

Overview

Used to extend a wrapper class with class-aware api calls, allowing users to use a more DRY api interface. Example:

site = Piwik::Site.load(7)
p = site.actions # returns an extended version of the Piwik::Actions api module
=> Piwik::Actions
p.outlinks # equivalent to Piwik::Actions.getOutlinks(:idSite => 7)
=> #<Piwik::Actions::Outlinks @data=[snip]>

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


11
12
13
# File 'lib/piwik/api_scope.rb', line 11

def self.included(base)
  base.extend ClassMethods
end