oleg-chulakov-studio / yii2-okapi
Yii2 component for OK API
Installs: 60
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 6
Forks: 0
Open Issues: 0
Type:yii2-components
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2024-10-20 01:41:54 UTC
README
Install by composer
composer require oleg-chulakov-studio/yii2-okapi
Or add this code into require section of your composer.json and then call composer update in console
"oleg-chulakov-studio/yii2-okapi": "*"
Usage
In configuration file do
<?php 'components' => [ 'OkApi' => [ 'class' => \OlegChulakovStudio\okapi\YiiOkComponent::className(), 'applicationId' => '', 'applicationKey' => '', 'applicationSecretKey' => '', 'accessToken' => '' ], ] ?>
Use as simple component
<?php $responseData = Yii::$app->YiiVk->request('search.tagContents', [ 'count' => 25, 'query' => $this->tagSearch, 'filter' => '{ "types" : ["USER_TOPIC", "USER_PHOTO","GROUP_PHOTO", "GROUP_TOPIC"]}', 'fields' => 'group_photo.ID,group_photo.ALBUM_ID,group_photo.GROUP_ID,group_photo.PIC1024MAX', ]); ?>