Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.2 KB

README.md

File metadata and controls

45 lines (34 loc) · 1.2 KB

API Yandex Metrika - Yii extension

Provides simple interface to access Yandex.Metrika API

It's only sketch!

###Installation

  • Unpack to protected/extensions
  • Add the following to your config file 'components' section:
<?php
// ...
'metrika' => array(
    'class' => 'application.modules.YandexApi.YandexApiYii',
    'client_id' => '5e0<bla-bla-bla-bla-bla-bla>5f6',
    'client_secret' => 'd8a<bla-bla-bla-bla-bla-bla>9f4',
    'access_token' => '30<bla-bla-bla-bla-bla-bla>73',
    'service' => 'metrika',
),

###Usage

Somewhere in cli command:

<?php
class TestCommand extends CConsoleCommand
{

    public function actionIndex(){
        var_dump(Yii::app()->metrika->getCounters());
    }

}

Will add documentation soon.