mirror of
https://github.com/friendica/friendica
synced 2025-04-28 21:44:22 +02:00
Add additional Mastodon timeline sorting date types and data to output
This commit is contained in:
parent
1adb23d8fd
commit
1f6578229e
6 changed files with 138 additions and 33 deletions
|
@ -35,6 +35,18 @@ class FriendicaExtension extends BaseDataTransferObject
|
|||
/** @var string */
|
||||
protected $title;
|
||||
|
||||
/** @var string|null (Datetime) */
|
||||
protected $changed_at;
|
||||
|
||||
/** @var string|null (Datetime) */
|
||||
protected $commented_at;
|
||||
|
||||
/** @var string|null (Datetime) */
|
||||
protected $edited_at;
|
||||
|
||||
/** @var string|null (Datetime) */
|
||||
protected $received_at;
|
||||
|
||||
/** @var FriendicaDeliveryData */
|
||||
protected $delivery_data;
|
||||
/** @var int */
|
||||
|
@ -47,10 +59,52 @@ class FriendicaExtension extends BaseDataTransferObject
|
|||
* @param int $dislikes_count
|
||||
* @param FriendicaDeliveryData $delivery_data
|
||||
*/
|
||||
public function __construct(string $title, int $dislikes_count, FriendicaDeliveryData $delivery_data)
|
||||
public function __construct(string $title, ?string $changed_at, ?string $commented_at, ?string $edited_at, ?string $received_at,
|
||||
int $dislikes_count, FriendicaDeliveryData $delivery_data)
|
||||
{
|
||||
$this->title = $title;
|
||||
$this->changed_at = $changed_at;
|
||||
$this->commented_at = $commented_at;
|
||||
$this->edited_at = $edited_at;
|
||||
$this->received_at = $received_at;
|
||||
$this->delivery_data = $delivery_data;
|
||||
$this->dislikes_count = $dislikes_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current changed_at string or null if not set
|
||||
* @return ?string
|
||||
*/
|
||||
public function changedAt(): ?string
|
||||
{
|
||||
return $this->changed_at;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current commented_at string or null if not set
|
||||
* @return ?string
|
||||
*/
|
||||
public function commentedAt(): ?string
|
||||
{
|
||||
return $this->commented_at;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current edited_at string or null if not set
|
||||
* @return ?string
|
||||
*/
|
||||
public function editedAt(): ?string
|
||||
{
|
||||
return $this->edited_at;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current received_at string or null if not set
|
||||
* @return ?string
|
||||
*/
|
||||
public function receivedAt(): ?string
|
||||
{
|
||||
return $this->received_at;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue