1 | <?php |
||
24 | class Account |
||
25 | { |
||
26 | /** |
||
27 | * Account name, helps users with several accounts remember which they are currently using. |
||
28 | * Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private $shortName; |
||
33 | |||
34 | /** |
||
35 | * Default author name used when creating new articles. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $authorName; |
||
40 | |||
41 | /** |
||
42 | * Profile link, opened when users click on the author's name below the title. |
||
43 | * Can be any link, not necessarily to a Telegram profile or channel. |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | private $authorUrl; |
||
48 | |||
49 | /** |
||
50 | * Only returned by the createAccount and revokeAccessToken method. Access token of the Telegraph account. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | private $accessToken; |
||
55 | |||
56 | /** |
||
57 | * URL to authorize a browser on telegra.ph and connect it to a Telegraph account. |
||
58 | * This URL is valid for only one use and for 5 minutes only. |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | private $authUrl; |
||
63 | |||
64 | /** |
||
65 | * Number of pages belonging to the Telegraph account. |
||
66 | * |
||
67 | * @var int |
||
68 | */ |
||
69 | private $pageCount; |
||
70 | |||
71 | public function __construct(array $data) |
||
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | public function getShortName(): string |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getAuthorName(): string |
||
96 | |||
97 | /** |
||
98 | * @return string |
||
99 | */ |
||
100 | public function getAuthorUrl(): string |
||
104 | |||
105 | /** |
||
106 | * @return string |
||
107 | */ |
||
108 | public function getAccessToken(): string |
||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getAuthUrl(): string |
||
120 | |||
121 | /** |
||
122 | * @return int|null |
||
123 | */ |
||
124 | public function getPageCount(): int |
||
128 | } |
||
129 |