/
UserEndpoint.php
53 lines (43 loc) · 1.41 KB
/
UserEndpoint.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
namespace Rikudou\LemmyApi\Endpoint;
use Rikudou\LemmyApi\Enum\SortType;
use Rikudou\LemmyApi\Response\Aggregates\PersonAggregates;
use Rikudou\LemmyApi\Response\Model\CaptchaResponse;
use Rikudou\LemmyApi\Response\Model\Community;
use Rikudou\LemmyApi\Response\Model\Person;
use Rikudou\LemmyApi\Response\View\CommentView;
use Rikudou\LemmyApi\Response\View\PostView;
interface UserEndpoint
{
public function get(string|int $usernameOrId): Person;
public function getCounts(string|int|Person $user): PersonAggregates;
public function getCommentKarma(int|string|Person $user): int;
public function getPostKarma(int|string|Person $user): int;
/**
* @return array<Community>
*/
public function getModeratedCommunities(string|int|Person $usernameOrId): array;
/**
* @return array<CommentView>
*/
public function getComments(
Person|string|int $user,
?int $limit = null,
Community|int|null $community = null,
?int $page = null,
?SortType $sort = null,
?bool $savedOnly = null,
): array;
/**
* @return array<PostView>
*/
public function getPosts(
Person|string|int $user,
?int $limit = null,
Community|int|null $community = null,
?int $page = null,
?SortType $sort = null,
?bool $savedOnly = null,
): array;
public function getCaptcha(): ?CaptchaResponse;
}