PHP code example of fastwhale / yii2-we-work

1. Go to this page and download the library: Download fastwhale/yii2-we-work library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fastwhale / yii2-we-work example snippets


/** @var Work $workApi */
$workApi = \Yii::createObject([
    'class'  => Work::className(),
    'corpid' => $corpid,
    'secret' => $secret,
]);

/** @var Work $agentApi */
$agentApi = \Yii::createObject([
    'class'  => Work::className(),
    'corpid' => $corpid,
    'secret' => $agentSecret,
]);

/** @var ServiceWork $serviceWork */
$serviceWork = \Yii::createObject([
    'class'          => ServiceWork::className(),
    'suite_id'       => $suiteId,
    'suite_secret'   => $suiteSecret,
    'suite_ticket'   => $suiteTicket,
    'auth_corpid'    => $authCorpid,
    'permanent_code' => $permanentCode,
]);

/** @var ServiceProvider $serviceProvider */
$serviceProvider = \Yii::createObject([
    'class'           => ServiceProvider::className(),
    'provider_corpid' => $providerCorpid,
    'provider_secret' => $providerSecret,
]);

php composer.phar