Initial commit
Some checks failed
定时更新GitHub源插件 / 自动更新GitHub插件 (push) Has been cancelled

This commit is contained in:
chorblack
2026-03-07 11:19:25 +08:00
commit e75f275ef4
4484 changed files with 645480 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
/**
* @name 每日一句
* @package DailySentence
* @author 冰剑
* @link http://www.binjoo.net
* @description 每日一句唯美的英语
* @version 1.0.0
*
* @param false
*/
class AddonsDailySentence {
private $result;
private $postObj;
private $params;
function __construct($result, $postObj = NULL, $params = NULL) {
$this->result = $result;
$this->postObj = $postObj;
$this->params = $params;
}
public function execute(){
$client = Typecho_Http_Client::get();
//金山词霸http://open.iciba.com/dsapi/
//词海http://en.dict.cn/api/article/daily
$response = $client->send('http://en.dict.cn/api/article/daily');
$response = json_decode($response);
$text = $response->en.chr(10).chr(10);
$text .= $response->ch;
$this->result->setMsgType(MessageTemplate::TEXT)->setText($text)->send();
}
}
?>