summaryrefslogtreecommitdiff
path: root/internal/api/client/search
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-08-02 19:06:44 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-02 19:06:44 +0200
commit0386a28b5a3c4212320e8a96ddd14c54b65a2090 (patch)
tree3bfdf198934215ac64acac9d66d952baf65c2752 /internal/api/client/search
parentfix breaky linky (diff)
downloadgotosocial-0386a28b5a3c4212320e8a96ddd14c54b65a2090.tar.xz
Frodo swaggins (#126)
* more swagger fun * document a whole bunch more stuff * more swagger yayyyyyyy * progress + go fmt
Diffstat (limited to 'internal/api/client/search')
-rw-r--r--internal/api/client/search/searchget.go28
1 files changed, 26 insertions, 2 deletions
diff --git a/internal/api/client/search/searchget.go b/internal/api/client/search/searchget.go
index 1e2694673..faa227719 100644
--- a/internal/api/client/search/searchget.go
+++ b/internal/api/client/search/searchget.go
@@ -29,8 +29,32 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/oauth"
)
-// SearchGETHandler handles searches for local and remote accounts, statuses, and hashtags.
-// It corresponds to the mastodon endpoint described here: https://docs.joinmastodon.org/methods/search/
+// SearchGETHandler swagger:operation GET /api/v1/search searchGet
+//
+// Search for statuses, accounts, or hashtags, on this instance or elsewhere.
+//
+// If statuses are in the result, they will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer).
+//
+// ---
+// tags:
+// - search
+//
+// security:
+// - OAuth2 Bearer:
+// - read:search
+//
+// responses:
+// '200':
+// name: search results
+// description: Results of the search.
+// schema:
+// type: array
+// items:
+// "$ref": "#/definitions/searchResult"
+// '401':
+// description: unauthorized
+// '400':
+// description: bad request
func (m *Module) SearchGETHandler(c *gin.Context) {
l := m.log.WithFields(logrus.Fields{
"func": "SearchGETHandler",