summaryrefslogtreecommitdiff
path: root/internal/api/client/search/search.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-06-21 18:26:40 +0200
committerLibravatar GitHub <noreply@github.com>2023-06-21 17:26:40 +0100
commit831ae09f8bab04af854243421047371339c3e190 (patch)
treef7709d478cc363dc1899bdb658fe20e2dc7986f3 /internal/api/client/search/search.go
parent[docs] Disambiguate docker version, don't recommend opening localhost (#1913) (diff)
downloadgotosocial-831ae09f8bab04af854243421047371339c3e190.tar.xz
[feature] Add partial text search for accounts + statuses (#1836)
Diffstat (limited to 'internal/api/client/search/search.go')
-rw-r--r--internal/api/client/search/search.go35
1 files changed, 2 insertions, 33 deletions
diff --git a/internal/api/client/search/search.go b/internal/api/client/search/search.go
index eaa3102f9..219e30280 100644
--- a/internal/api/client/search/search.go
+++ b/internal/api/client/search/search.go
@@ -25,39 +25,8 @@ import (
)
const (
- // BasePathV1 is the base path for serving v1 of the search API, minus the 'api' prefix
- BasePathV1 = "/v1/search"
-
- // BasePathV2 is the base path for serving v2 of the search API, minus the 'api' prefix
- BasePathV2 = "/v2/search"
-
- // AccountIDKey -- If provided, statuses returned will be authored only by this account
- AccountIDKey = "account_id"
- // MaxIDKey -- Return results older than this id
- MaxIDKey = "max_id"
- // MinIDKey -- Return results immediately newer than this id
- MinIDKey = "min_id"
- // TypeKey -- Enum(accounts, hashtags, statuses)
- TypeKey = "type"
- // ExcludeUnreviewedKey -- Filter out unreviewed tags? Defaults to false. Use true when trying to find trending tags.
- ExcludeUnreviewedKey = "exclude_unreviewed"
- // QueryKey -- The search query
- QueryKey = "q"
- // ResolveKey -- Attempt WebFinger lookup. Defaults to false.
- ResolveKey = "resolve"
- // LimitKey -- Maximum number of results to load, per type. Defaults to 20. Max 40.
- LimitKey = "limit"
- // OffsetKey -- Offset in search results. Used for pagination. Defaults to 0.
- OffsetKey = "offset"
- // FollowingKey -- Only include accounts that the user is following. Defaults to false.
- FollowingKey = "following"
-
- // TypeAccounts --
- TypeAccounts = "accounts"
- // TypeHashtags --
- TypeHashtags = "hashtags"
- // TypeStatuses --
- TypeStatuses = "statuses"
+ BasePathV1 = "/v1/search" // Base path for serving v1 of the search API, minus the 'api' prefix.
+ BasePathV2 = "/v2/search" // Base path for serving v2 of the search API, minus the 'api' prefix.
)
type Module struct {