From f5c004d67d4ed66b6c6df100afec47174aa14ae0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 25 May 2023 10:37:38 +0200 Subject: [feature] Add List functionality (#1802) * start working on lists * further list work * test list db functions nicely * more work on lists * peepoopeepoo * poke * start list timeline func * we're getting there lads * couldn't be me working on stuff... could it? * hook up handlers * fiddling * weeee * woah * screaming, pissing * fix streaming being a whiny baby * lint, small test fix, swagger * tidying up, testing * fucked! by the linter * move timelines to state like a boss * add timeline start to tests using state * invalidate lists --- internal/api/client/timelines/timeline.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/api/client/timelines/timeline.go') diff --git a/internal/api/client/timelines/timeline.go b/internal/api/client/timelines/timeline.go index bf8ef1e2e..2580333d9 100644 --- a/internal/api/client/timelines/timeline.go +++ b/internal/api/client/timelines/timeline.go @@ -27,10 +27,12 @@ import ( const ( // BasePath is the base URI path for serving timelines, minus the 'api' prefix. BasePath = "/v1/timelines" + IDKey = "id" // HomeTimeline is the path for the home timeline HomeTimeline = BasePath + "/home" // PublicTimeline is the path for the public (and public local) timeline PublicTimeline = BasePath + "/public" + ListTimeline = BasePath + "/list/:" + IDKey // MaxIDKey is the url query for setting a max status ID to return MaxIDKey = "max_id" // SinceIDKey is the url query for returning results newer than the given ID @@ -56,4 +58,5 @@ func New(processor *processing.Processor) *Module { func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes) { attachHandler(http.MethodGet, HomeTimeline, m.HomeTimelineGETHandler) attachHandler(http.MethodGet, PublicTimeline, m.PublicTimelineGETHandler) + attachHandler(http.MethodGet, ListTimeline, m.ListTimelineGETHandler) } -- cgit v1.2.3