atans / yii2-weibo-shorturl
Weibo short url client
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-12-14 00:08:37 UTC
README
Weibo short url client
Installation
The preferred way to install this extension is through composer.
Either run
composer require atans/yii2-weibo-shorturl
or add
"atans/yii2-weibo-shorturl": "*"
to the require section of your composer.json
file.
Usage
// app/config/main-local.php use atans\weibo\ShortUrl; return [ 'components' => [ // ... 'shortUrl' => [ 'class' => ShortUrl::className(), 'appKey' => '<your-app-key>', ], ], ]; // Use it $response = Yii::$app->shortUrl->shorten('http://www.yiiframework.com');