diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-01-04 18:42:58 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-02-05 15:10:24 -0100 |
commit | c7d1da1f53a4fbde722a28ed0b98acf511409f22 (patch) | |
tree | a4b5eb133c8ebb618a110b4a8736c1e969fe8bc7 /lib/Controller/LocalController.php | |
parent | 47fa5d08f30836c5ddeb4a5952effb1f16df6fca (diff) |
get stream for hashtag
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Controller/LocalController.php')
-rw-r--r-- | lib/Controller/LocalController.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php index 9b435490..215fee60 100644 --- a/lib/Controller/LocalController.php +++ b/lib/Controller/LocalController.php @@ -295,6 +295,30 @@ class LocalController extends Controller { } } + + /** + * Get timeline + * + * @NoCSRFRequired + * @NoAdminRequired + * + * @param int $since + * @param int $limit + * + * @return DataResponse + */ + public function streamTag(string $hashtag, int $since = 0, int $limit = 5): DataResponse { + try { + $posts = $this->noteService->getStreamLocalTag($hashtag, $since, $limit); + + return $this->success($posts); + } catch (Exception $e) { + return $this->fail($e); + } + } + + + /** * Get timeline * |