dynamikaweb/yii2-1doc-api

1Doc api model for Yii2.

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Type:yii2-extension

0.1a 2019-09-18 15:24 UTC

This package is auto-updated.

Last update: 2024-12-19 03:14:06 UTC


README

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]);
    }
}