mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 17:44:27 +02:00
API: Added trending links
This commit is contained in:
parent
e391328cbf
commit
de76e860ad
8 changed files with 74 additions and 8 deletions
|
@ -30,13 +30,14 @@ use Friendica\Util\Strings;
|
|||
class Card extends BaseFactory
|
||||
{
|
||||
/**
|
||||
* @param int $uriId Uri-ID of the item
|
||||
* @param int $uriId Uri-ID of the item
|
||||
* @param array $history Link request history
|
||||
*
|
||||
* @return \Friendica\Object\Api\Mastodon\Card
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException*@throws \Exception
|
||||
*/
|
||||
public function createFromUriId(int $uriId): \Friendica\Object\Api\Mastodon\Card
|
||||
public function createFromUriId(int $uriId, array $history = []): \Friendica\Object\Api\Mastodon\Card
|
||||
{
|
||||
$item = Post::selectFirst(['body'], ['uri-id' => $uriId]);
|
||||
if (!empty($item['body'])) {
|
||||
|
@ -76,6 +77,6 @@ class Card extends BaseFactory
|
|||
}
|
||||
}
|
||||
|
||||
return new \Friendica\Object\Api\Mastodon\Card($data);
|
||||
return new \Friendica\Object\Api\Mastodon\Card($data, $history);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue