3 * @copyright Copyright (C) 2010-2023, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 namespace Friendica\Object\Api\Mastodon;
24 use Friendica\BaseDataTransferObject;
25 use Friendica\Object\Api\Mastodon\InstanceV2\Configuration;
26 use Friendica\Object\Api\Mastodon\InstanceV2\Contact;
27 use Friendica\Object\Api\Mastodon\InstanceV2\FriendicaExtensions;
28 use Friendica\Object\Api\Mastodon\InstanceV2\Registrations;
29 use Friendica\Object\Api\Mastodon\InstanceV2\Thumbnail;
30 use Friendica\Object\Api\Mastodon\InstanceV2\Usage;
35 * @see https://docs.joinmastodon.org/entities/Instance/
37 class InstanceV2 extends BaseDataTransferObject
46 protected $source_url;
48 protected $description;
55 /** @var Configuration */
56 protected $configuration;
57 /** @var Registrations */
58 protected $registrations;
62 protected $rules = [];
63 /** @var FriendicaExtensions */
67 * @param string $domain
68 * @param string $title
70 * @param string $description
72 * @param Thumbnail $thumbnail
73 * @param array $languages
74 * @param Configuration $configuration
75 * @param Registrations $registrations
76 * @param Contact $contact
77 * @param FriendicaExtensions $friendica_extensions
80 public function __construct(
88 Configuration $configuration,
89 Registrations $registrations,
91 FriendicaExtensions $friendica_extensions,
94 $this->domain = $domain;
95 $this->title = $title;
96 $this->version = $version;
97 $this->source_url = null; //not supported yet
98 $this->description = $description;
99 $this->usage = $usage;
100 $this->thumbnail = $thumbnail;
101 $this->languages = $languages;
102 $this->configuration = $configuration;
103 $this->registrations = $registrations;
104 $this->contact = $contact;
105 $this->rules = $rules;
106 $this->friendica = $friendica_extensions;