Skip to content

dynamikaweb/yii2-1doc-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamikaweb/yii2-1doc-api

Latest Stable Version Total Downloads License Codacy Badge Build Test Latest Unstable Version

Instalação

ultilize composer para instalar esta extensão.

execute

$ composer require dynamikaweb/yii2-1doc-api 

ou adicione

"dynamikaweb/yii2-1doc-api" : "*"

to the require section of your application's composer.json file.

Como configurar

adicione ao arquivo config/main.php o seguinte component:

'components' => [
        'OneDocApi' => [
            'class' => 'dynamikaweb\api\OneDocApi',
            'client_auth' => '',
            'token' => '',
            'secret' => '',
        ],
],

Como usar

class DemoController extends MyBaseController
{
    public function actionIndex()
    {   
        $api = Yii::$app->OneDocApi;
   
        $api->find([
            'method' => 'list',
            'documento' => 24,
            'grupo' => 19
        ]);

        return $this->render('index', ['api' => $api->run]);
    }
}