mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:50:11 +00:00
Implement time based paging for Mastodon Home Timeline Endpoint
This commit is contained in:
parent
b1b3b0ffe7
commit
818075d039
4 changed files with 131 additions and 22 deletions
|
@ -154,6 +154,21 @@ class Status extends BaseDataTransferObject
|
|||
$this->friendica = new FriendicaExtension($item['title'], $counts->dislikes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current created_at DateTime as an integer timestamp
|
||||
* @return int
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function createdAtTimestamp(): int
|
||||
{
|
||||
$result = strtotime($this->created_at);
|
||||
if (!$result) {
|
||||
throw new \Exception('Unknown date-time format');
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current entity as an array
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue