@@ 35-43 (lines=9) @@ | ||
32 | * @param int $id |
|
33 | * @return Entity\Account |
|
34 | */ |
|
35 | public static function getAccount(Client $client, SessionStorage $session, $id) |
|
36 | { |
|
37 | v::intVal()->min(0)->assert($id); |
|
38 | ||
39 | return static::map( |
|
40 | Entity\Account::class, |
|
41 | $client->requestAPI('GET', sprintf('/api/v1/accounts/%d', $id), [], $session) |
|
42 | ); |
|
43 | } |
|
44 | ||
45 | /** |
|
46 | * Getting the current user |
|
@@ 283-291 (lines=9) @@ | ||
280 | * @param int $status_id |
|
281 | * @return Entity\Account[] |
|
282 | */ |
|
283 | public static function getStatus(Client $client, SessionStorage $session, $status_id) |
|
284 | { |
|
285 | v::intVal()->assert($status_id); |
|
286 | ||
287 | return static::map( |
|
288 | Entity\Status::class, |
|
289 | $client->requestAPI('GET', sprintf('/api/v1/statuses/%d', $status_id), [], $session) |
|
290 | ); |
|
291 | } |
|
292 | ||
293 | /** |
|
294 | * @param string|string[] $class |