mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:10:11 +00:00
parent
07c20da08f
commit
c6160a1c38
11 changed files with 127 additions and 9 deletions
|
@ -42,6 +42,8 @@ class Application extends BaseDataTransferObject
|
|||
protected $redirect_uri;
|
||||
/** @var string */
|
||||
protected $website;
|
||||
/** @var string */
|
||||
protected $vapid_key;
|
||||
|
||||
/**
|
||||
* Creates an application entry
|
||||
|
@ -49,7 +51,7 @@ class Application extends BaseDataTransferObject
|
|||
* @param array $item
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function __construct(string $name, string $client_id = null, string $client_secret = null, int $id = null, string $redirect_uri = null, string $website = null)
|
||||
public function __construct(string $name, string $client_id = null, string $client_secret = null, int $id = null, string $redirect_uri = null, string $website = null, string $vapid_key = null)
|
||||
{
|
||||
$this->client_id = $client_id;
|
||||
$this->client_secret = $client_secret;
|
||||
|
@ -57,6 +59,7 @@ class Application extends BaseDataTransferObject
|
|||
$this->name = $name;
|
||||
$this->redirect_uri = $redirect_uri;
|
||||
$this->website = $website;
|
||||
$this->vapid_key = $vapid_key;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,6 +46,8 @@ class Card extends BaseDataTransferObject
|
|||
protected $provider_name;
|
||||
/** @var string */
|
||||
protected $provider_url;
|
||||
/** @var string */
|
||||
protected $html;
|
||||
/** @var int */
|
||||
protected $width;
|
||||
/** @var int */
|
||||
|
@ -53,6 +55,8 @@ class Card extends BaseDataTransferObject
|
|||
/** @var string */
|
||||
protected $image;
|
||||
/** @var string */
|
||||
protected $embed_url;
|
||||
/** @var string */
|
||||
protected $blurhash;
|
||||
/** @var array */
|
||||
protected $history;
|
||||
|
@ -73,9 +77,11 @@ class Card extends BaseDataTransferObject
|
|||
$this->author_url = $attachment['author_url'] ?? '';
|
||||
$this->provider_name = $attachment['provider_name'] ?? '';
|
||||
$this->provider_url = $attachment['provider_url'] ?? '';
|
||||
$this->html = '';
|
||||
$this->width = $attachment['width'] ?? 0;
|
||||
$this->height = $attachment['height'] ?? 0;
|
||||
$this->image = $attachment['image'] ?? '';
|
||||
$this->embed_url = '';
|
||||
$this->blurhash = $attachment['blurhash'] ?? '';
|
||||
$this->history = $history;
|
||||
}
|
||||
|
|
44
src/Object/Api/Mastodon/ExtendedDescription.php
Normal file
44
src/Object/Api/Mastodon/ExtendedDescription.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Object\Api\Mastodon;
|
||||
|
||||
use Friendica\BaseDataTransferObject;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
/**
|
||||
* Class ExtendedDescription
|
||||
*
|
||||
* @see https://docs.joinmastodon.org/entities/ExtendedDescription/
|
||||
*/
|
||||
class ExtendedDescription extends BaseDataTransferObject
|
||||
{
|
||||
/** @var string (Datetime) */
|
||||
protected $updated_at;
|
||||
/** @var string */
|
||||
protected $content;
|
||||
|
||||
public function __construct(\DateTime $updated_at, string $content)
|
||||
{
|
||||
$this->updated_at = $updated_at->format(DateTimeFormat::JSON);
|
||||
$this->content = $content;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue