Updated wrapper

This commit is contained in:
Pablo Ferreiro 2022-05-24 14:10:41 +02:00
parent 14a8829087
commit 55e1e9057b
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
19 changed files with 110 additions and 73 deletions

View file

@ -1,8 +1,10 @@
<?php
namespace App\Models;
use TikScraper\Models\Meta;
class ErrorTemplate extends BaseTemplate {
public object $error;
public Meta $error;
function __construct(object $error) {
parent::__construct('Error');

View file

@ -5,10 +5,12 @@ namespace App\Models;
* Base for templates with a feed
*/
class FeedTemplate extends BaseTemplate {
public object $feed;
public object $data;
function __construct(string $title, object $feed) {
parent::__construct($title);
$this->feed = $feed;
$this->data = (object) [
'feed' => $feed
];
}
}

View file

@ -0,0 +1,16 @@
<?php
namespace App\Models;
use TikScraper\Models\Full;
/**
* Base for templates with both info and feed
*/
class FullTemplate extends BaseTemplate {
public Full $data;
function __construct(string $title, Full $data) {
parent::__construct($title);
$this->data = $data;
}
}