github/app/Services/Github/Mod/Base.php
2025-07-02 16:47:32 +08:00

48 lines
1.0 KiB
PHP
Executable File

<?php
namespace App\Services\Github\Mod;
use App\Services\TomTool\Http;
class Base {
public $oHttp;
public $oHuodong; // 没用了
public $sHuodongStr; // 没用了
public $aShip;
public $aArticle;
public function __construct()
{
$this->oHttp = new Http();
}
public function todayUpd()
{
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/todayupd';
$r = $this->oHttp->send();
if (env('is_loc') == 1) {
return true;
}
if ($r == 1) {
return true;
} else {
return false;
}
}
public function getArticleFreenode()
{
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
$sFreenodeNow = $this->oHttp->send();
$aFreenodeNow = json_decode($sFreenodeNow, 1);
// $sTitleSub = $aFreenodeNow['title_sub'];
return $aFreenodeNow;
}
}