]> git.mxchange.org Git - friendica.git/blob - src/Object/Api/Mastodon/FollowRequest.php
Update Mastodon API with new profile field entity
[friendica.git] / src / Object / Api / Mastodon / FollowRequest.php
1 <?php
2
3 namespace Friendica\Object\Api\Mastodon;
4
5 use Friendica\App\BaseURL;
6 use Friendica\Collection\Api\Mastodon\Fields;
7
8 /**
9  * Virtual entity to separate Accounts from Follow Requests.
10  * In the Mastodon API they are one and the same.
11  */
12 class FollowRequest extends Account
13 {
14         /**
15          * Creates a follow request entity from an introduction record.
16          *
17          * The account ID is set to the Introduction ID to allow for later interaction with follow requests.
18          *
19          * @param BaseURL $baseUrl
20          * @param int     $introduction_id Introduction record id
21          * @param array   $publicContact   Full contact table record with uid = 0
22          * @param array   $apcontact       Optional full apcontact table record
23          * @param array   $userContact     Optional full contact table record with uid != 0
24          * @throws \Friendica\Network\HTTPException\InternalServerErrorException
25          */
26         public function __construct(BaseURL $baseUrl, int $introduction_id, array $publicContact, array $apcontact = [], array $userContact = [])
27         {
28                 parent::__construct($baseUrl, $publicContact, new Fields(), $apcontact, $userContact);
29
30                 $this->id = $introduction_id;
31         }
32 }