summaryrefslogtreecommitdiff
path: root/internal/api/client/account/statuses.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/account/statuses.go')
-rw-r--r--internal/api/client/account/statuses.go74
1 files changed, 68 insertions, 6 deletions
diff --git a/internal/api/client/account/statuses.go b/internal/api/client/account/statuses.go
index c92e85cee..8e9faffcf 100644
--- a/internal/api/client/account/statuses.go
+++ b/internal/api/client/account/statuses.go
@@ -28,13 +28,75 @@ import (
// AccountStatusesGETHandler serves the statuses of the requested account, if they're visible to the requester.
//
-// Several different filters might be passed into this function in the query:
+// swagger:operation GET /api/v1/accounts/{id}/statuses accountStatuses
//
-// limit -- show only limit number of statuses
-// exclude_replies -- exclude statuses that are a reply to another status
-// max_id -- the maximum ID of the status to show
-// pinned -- show only pinned statuses
-// media_only -- show only statuses that have media attachments
+// See statuses posted by the requested account.
+//
+// The statuses will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer).
+//
+// ---
+// tags:
+// - accounts
+//
+// produces:
+// - application/json
+//
+// parameters:
+// - name: id
+// type: string
+// description: Account ID.
+// in: path
+// required: true
+// - name: limit
+// type: integer
+// description: Number of statuses to return.
+// default: 30
+// in: query
+// required: false
+// - name: exclude_replies
+// type: boolean
+// description: Exclude statuses that are a reply to another status.
+// default: false
+// in: query
+// required: false
+// - name: max_id
+// type: string
+// description: |-
+// Return only statuses *OLDER* than the given max status ID.
+// The status with the specified ID will not be included in the response.
+// in: query
+// required: false
+// - name: pinned_only
+// type: boolean
+// description: Show only pinned statuses. In other words,e xclude statuses that are not pinned to the given account ID.
+// default: false
+// in: query
+// required: false
+// - name: media_only
+// type: boolean
+// description: Show only statuses with media attachments.
+// default: false
+// in: query
+// required: false
+//
+// security:
+// - OAuth2 Bearer:
+// - read:accounts
+//
+// responses:
+// '200':
+// name: statuses
+// description: Array of statuses..
+// schema:
+// type: array
+// items:
+// "$ref": "#/definitions/status"
+// '401':
+// description: unauthorized
+// '400':
+// description: bad request
+// '404':
+// description: not found
func (m *Module) AccountStatusesGETHandler(c *gin.Context) {
l := m.log.WithField("func", "AccountStatusesGETHandler")