Move Mastodon API entities to src/Object
This commit is contained in:
parent
74a25eb670
commit
0de8e4db08
13 changed files with 24 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api;
|
namespace Friendica;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The API entity classes are meant as data transfer objects. As such, their member should be protected.
|
* The API entity classes are meant as data transfer objects. As such, their member should be protected.
|
|
@ -24,7 +24,7 @@ class Account extends BaseFactory
|
||||||
/**
|
/**
|
||||||
* @param int $contactId
|
* @param int $contactId
|
||||||
* @param int $uid User Id
|
* @param int $uid User Id
|
||||||
* @return \Friendica\Api\Entity\Mastodon\Account
|
* @return \Friendica\Object\Api\Mastodon\Account
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
|
@ -41,6 +41,6 @@ class Account extends BaseFactory
|
||||||
|
|
||||||
$apcontact = APContact::getByURL($publicContact['url'], false);
|
$apcontact = APContact::getByURL($publicContact['url'], false);
|
||||||
|
|
||||||
return new \Friendica\Api\Entity\Mastodon\Account($this->baseUrl, $publicContact, $apcontact, $userContact);
|
return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $publicContact, $apcontact, $userContact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ class FollowRequest extends BaseFactory
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Introduction $introduction
|
* @param Introduction $introduction
|
||||||
* @return \Friendica\Api\Entity\Mastodon\FollowRequest
|
* @return \Friendica\Object\Api\Mastodon\FollowRequest
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @throws HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
|
@ -42,6 +42,6 @@ class FollowRequest extends BaseFactory
|
||||||
|
|
||||||
$apcontact = APContact::getByURL($publicContact['url'], false);
|
$apcontact = APContact::getByURL($publicContact['url'], false);
|
||||||
|
|
||||||
return new \Friendica\Api\Entity\Mastodon\FollowRequest($this->baseUrl, $introduction->id, $publicContact, $apcontact, $userContact);
|
return new \Friendica\Object\Api\Mastodon\FollowRequest($this->baseUrl, $introduction->id, $publicContact, $apcontact, $userContact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Friendica\Factory\Mastodon;
|
namespace Friendica\Factory\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\Entity\Mastodon\Relationship as RelationshipEntity;
|
use Friendica\Object\Api\Mastodon\Relationship as RelationshipEntity;
|
||||||
use Friendica\BaseFactory;
|
use Friendica\BaseFactory;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Friendica\Module\Api\Mastodon;
|
namespace Friendica\Module\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\Entity\Mastodon;
|
use Friendica\Object\Api\Mastodon;
|
||||||
use Friendica\Api\Entity\Mastodon\Relationship;
|
use Friendica\Object\Api\Mastodon\Relationship;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Friendica\Module\Api\Mastodon;
|
namespace Friendica\Module\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\Entity\Mastodon\Instance as InstanceEntity;
|
use Friendica\Object\Api\Mastodon\Instance as InstanceEntity;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Module\Base\Api;
|
use Friendica\Module\Base\Api;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api\Entity\Mastodon;
|
namespace Friendica\Object\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\BaseEntity;
|
|
||||||
use Friendica\App\BaseURL;
|
use Friendica\App\BaseURL;
|
||||||
|
use Friendica\BaseEntity;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api\Entity\Mastodon;
|
namespace Friendica\Object\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\BaseEntity;
|
use Friendica\BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Emoji
|
* Class Emoji
|
||||||
|
@ -13,9 +13,9 @@ class Emoji extends BaseEntity
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $shortcode;
|
protected $shortcode;
|
||||||
/** @var string (URL)*/
|
/** @var string (URL) */
|
||||||
protected $static_url;
|
protected $static_url;
|
||||||
/** @var string (URL)*/
|
/** @var string (URL) */
|
||||||
protected $url;
|
protected $url;
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
protected $visible_in_picker;
|
protected $visible_in_picker;
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api\Entity\Mastodon;
|
namespace Friendica\Object\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\BaseEntity;
|
use Friendica\BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Field
|
* Class Field
|
|
@ -1,9 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api\Entity\Mastodon;
|
namespace Friendica\Object\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\App\BaseURL;
|
use Friendica\App\BaseURL;
|
||||||
use Friendica\Model\Introduction;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual entity to separate Accounts from Follow Requests.
|
* Virtual entity to separate Accounts from Follow Requests.
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api\Entity\Mastodon;
|
namespace Friendica\Object\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\BaseEntity;
|
use Friendica\BaseEntity;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api\Entity\Mastodon;
|
namespace Friendica\Object\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\BaseEntity;
|
use Friendica\BaseEntity;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Friendica\Api\Entity\Mastodon;
|
namespace Friendica\Object\Api\Mastodon;
|
||||||
|
|
||||||
use Friendica\Api\BaseEntity;
|
use Friendica\BaseEntity;
|
||||||
use Friendica\Core\Protocol;
|
use Friendica\Core\Protocol;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
Loading…
Reference in a new issue