. */ namespace App\Sources; use \App\Models\Game; use \App\Source; class VNDB extends Source { public $title = "VNDB"; public function parse() { global $config; $client = new Client(); $client->connect(); $client->login($config['VNDB_USER'], $config['VNDB_PASSWORD']); $date = (new Date("1 week ago"))->format('Y-m-d'); echo $date; return; $list = $client->sendCommand('get vn basic (released > "'.$date.'")'); foreach ($list as $gameData) { $game = new Game; $game->title = $gameData->title; $game->author = $gameData->developer->display_name; $game->date = $gameData->published_on / 1000; $game->description = $descData->payload->metaDescription; $game->url = 'https://gamejolt.com/games/'.$gameData->slug.'/'.$gameData->id; $this->output .= $game->print(); } } }