shamanzpua / yii2stackexchange
yii2 stackexchange component
1.0.1
2017-03-12 20:47 UTC
Requires
- shamanzpua/stackexchange: *
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-03-01 00:21:45 UTC
README
Yii2 stackexchange api component
Installation
Add to composer.json
"require": {
"shamanzpua/yii2stackexchange": "*"
}
Configuration:
<?php 'stackexchange' => [ 'class' => 'shamanzpua\yii2stackexchange\Stackexchange', 'apiKey' => 'YOUR_API_KEY', 'apis' => [ 'stackoverflow' => [ 'class' => 'shamanzpua\stackexchange\Stackoverflow' ], ], ]
Usage:
<?php $stack = Yii::$app->stackexchange->getApi('stackoverflow'); $data = $stack->grab('search keyword');