diff options
author | 2021-08-02 19:06:44 +0200 | |
---|---|---|
committer | 2021-08-02 19:06:44 +0200 | |
commit | 0386a28b5a3c4212320e8a96ddd14c54b65a2090 (patch) | |
tree | 3bfdf198934215ac64acac9d66d952baf65c2752 /internal/api/client/status/statuscontext.go | |
parent | fix breaky linky (diff) | |
download | gotosocial-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/status/statuscontext.go')
-rw-r--r-- | internal/api/client/status/statuscontext.go | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/internal/api/client/status/statuscontext.go b/internal/api/client/status/statuscontext.go index 83071f4a0..6e28b004e 100644 --- a/internal/api/client/status/statuscontext.go +++ b/internal/api/client/status/statuscontext.go @@ -26,7 +26,44 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// StatusContextGETHandler returns the context around the given status ID. +// StatusContextGETHandler swagger:operation GET /api/v1/statuses/{id}/context statusContext +// +// Return ancestors and descendants of the given status. +// +// The returned statuses will be ordered in a thread structure, so they are suitable to be displayed in the order in which they were returned. +// +// --- +// tags: +// - statuses +// +// produces: +// - application/json +// +// parameters: +// - name: id +// type: string +// description: Target status ID. +// in: path +// required: true +// +// security: +// - OAuth2 Bearer: +// - read:statuses +// +// responses: +// '200': +// name: statuses +// description: Status context object. +// schema: +// "$ref": "#/definitions/statusContext" +// '400': +// description: bad request +// '401': +// description: unauthorized +// '403': +// description: forbidden +// '404': +// description: not found func (m *Module) StatusContextGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "StatusContextGETHandler", |