diff options
Diffstat (limited to 'internal/api/client/account')
| -rw-r--r-- | internal/api/client/account/account_test.go | 2 | ||||
| -rw-r--r-- | internal/api/client/account/accountcreate.go | 54 | ||||
| -rw-r--r-- | internal/api/client/account/accountdelete.go | 55 | ||||
| -rw-r--r-- | internal/api/client/account/accountget.go | 58 | ||||
| -rw-r--r-- | internal/api/client/account/accountupdate.go | 168 | ||||
| -rw-r--r-- | internal/api/client/account/accountverify.go | 44 | ||||
| -rw-r--r-- | internal/api/client/account/block.go | 60 | ||||
| -rw-r--r-- | internal/api/client/account/follow.go | 93 | ||||
| -rw-r--r-- | internal/api/client/account/followers.go | 65 | ||||
| -rw-r--r-- | internal/api/client/account/following.go | 65 | ||||
| -rw-r--r-- | internal/api/client/account/relationships.go | 69 | ||||
| -rw-r--r-- | internal/api/client/account/statuses.go | 171 | ||||
| -rw-r--r-- | internal/api/client/account/unblock.go | 61 | ||||
| -rw-r--r-- | internal/api/client/account/unfollow.go | 61 | 
14 files changed, 529 insertions, 497 deletions
| diff --git a/internal/api/client/account/account_test.go b/internal/api/client/account/account_test.go index ceb15c7a2..aa639b3f4 100644 --- a/internal/api/client/account/account_test.go +++ b/internal/api/client/account/account_test.go @@ -74,6 +74,8 @@ func (suite *AccountStandardTestSuite) SetupTest() {  	suite.accountModule = account.New(suite.processor).(*account.Module)  	testrig.StandardDBSetup(suite.db, nil)  	testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media") + +	suite.NoError(suite.processor.Start())  }  func (suite *AccountStandardTestSuite) TearDownTest() { diff --git a/internal/api/client/account/accountcreate.go b/internal/api/client/account/accountcreate.go index c00d4f1be..e7b6c642d 100644 --- a/internal/api/client/account/accountcreate.go +++ b/internal/api/client/account/accountcreate.go @@ -39,37 +39,37 @@ import (  // The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'.  // The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// consumes: -// - application/json -// - application/xml -// - application/x-www-form-urlencoded +//	consumes: +//	- application/json +//	- application/xml +//	- application/x-www-form-urlencoded  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// security: -// - OAuth2 Application: -//   - write:accounts +//	security: +//	- OAuth2 Application: +//		- write:accounts  // -// responses: -//   '200': -//     description: "An OAuth2 access token for the newly-created account." -//     schema: -//       "$ref": "#/definitions/oauthToken" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			description: "An OAuth2 access token for the newly-created account." +//			schema: +//				"$ref": "#/definitions/oauthToken" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountCreatePOSTHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, false, false)  	if err != nil { diff --git a/internal/api/client/account/accountdelete.go b/internal/api/client/account/accountdelete.go index 448eaeb7c..53bdedd0f 100644 --- a/internal/api/client/account/accountdelete.go +++ b/internal/api/client/account/accountdelete.go @@ -33,37 +33,38 @@ import (  //  // Delete your account.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// consumes: -// - multipart/form-data +//	consumes: +//	- multipart/form-data  // -// parameters: -// - name: password -//   in: formData -//   description: Password of the account user, for confirmation. -//   type: string -//   required: true +//	parameters: +//	- +//		name: password +//		in: formData +//		description: Password of the account user, for confirmation. +//		type: string +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - write:accounts +//	security: +//	- OAuth2 Bearer: +//		- write:accounts  // -// responses: -//   '202': -//     description: "The account deletion has been accepted and the account will be deleted." -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'202': +//			description: "The account deletion has been accepted and the account will be deleted." +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountDeletePOSTHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/accountget.go b/internal/api/client/account/accountget.go index 2a060e175..c9aae5b2b 100644 --- a/internal/api/client/account/accountget.go +++ b/internal/api/client/account/accountget.go @@ -32,38 +32,40 @@ import (  //  // Get information about an account with the given ID.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: id -//   type: string -//   description: The id of the requested account. -//   in: path -//   required: true +//	parameters: +//	- +//		name: id +//		type: string +//		description: The id of the requested account. +//		in: path +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - read:accounts +//	security: +//	- OAuth2 Bearer: +//		- read:accounts  // -// responses: -//   '200': -//     schema: -//       "$ref": "#/definitions/account" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			description: The requested account. +//			schema: +//				"$ref": "#/definitions/account" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountGETHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/accountupdate.go b/internal/api/client/account/accountupdate.go index 3e5f60324..e2b2a731c 100644 --- a/internal/api/client/account/accountupdate.go +++ b/internal/api/client/account/accountupdate.go @@ -35,89 +35,101 @@ import (  //  // Update your account.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// consumes: -// - multipart/form-data +//	consumes: +//	- multipart/form-data  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: discoverable -//   in: formData -//   description: Account should be made discoverable and shown in the profile directory (if enabled). -//   type: boolean -// - name: bot -//   in: formData -//   description: Account is flagged as a bot. -//   type: boolean -// - name: display_name -//   in: formData -//   description: The display name to use for the account. -//   type: string -//   allowEmptyValue: true -// - name: note -//   in: formData -//   description: Bio/description of this account. -//   type: string -//   allowEmptyValue: true -// - name: avatar -//   in: formData -//   description: Avatar of the user. -//   type: file -// - name: header -//   in: formData -//   description: Header of the user. -//   type: file -// - name: locked -//   in: formData -//   description: Require manual approval of follow requests. -//   type: boolean -// - name: source[privacy] -//   in: formData -//   description: Default post privacy for authored statuses. -//   type: string -// - name: source[sensitive] -//   in: formData -//   description: Mark authored statuses as sensitive by default. -//   type: boolean -// - name: source[language] -//   in: formData -//   description: Default language to use for authored statuses (ISO 6391). -//   type: string -// - name: source[status_format] -//   in: formData -//   description: Default format to use for authored statuses (plain or markdown). -//   type: string -// - name: custom_css -//   in: formData -//   description: |- -//     Custom CSS to use when rendering this account's profile or statuses. -//     String must be no more than 5,000 characters (~5kb). -//   type: string +//	parameters: +//	- +//		name: discoverable +//		in: formData +//		description: Account should be made discoverable and shown in the profile directory (if enabled). +//		type: boolean +//	- +//		name: bot +//		in: formData +//		description: Account is flagged as a bot. +//		type: boolean +//	- +//		name: display_name +//		in: formData +//		description: The display name to use for the account. +//		type: string +//		allowEmptyValue: true +//	- +//		name: note +//		in: formData +//		description: Bio/description of this account. +//		type: string +//		allowEmptyValue: true +//	- +//		name: avatar +//		in: formData +//		description: Avatar of the user. +//		type: file +//	- +//		name: header +//		in: formData +//		description: Header of the user. +//		type: file +//	- +//		name: locked +//		in: formData +//		description: Require manual approval of follow requests. +//		type: boolean +//	- +//		name: source[privacy] +//		in: formData +//		description: Default post privacy for authored statuses. +//		type: string +//	- +//		name: source[sensitive] +//		in: formData +//		description: Mark authored statuses as sensitive by default. +//		type: boolean +//	- +//		name: source[language] +//		in: formData +//		description: Default language to use for authored statuses (ISO 6391). +//		type: string +//	- +//		name: source[status_format] +//		in: formData +//		description: Default format to use for authored statuses (plain or markdown). +//		type: string +//	- +//		name: custom_css +//		in: formData +//		description: >- +//			Custom CSS to use when rendering this account's profile or statuses. +//			String must be no more than 5,000 characters (~5kb). +//		type: string  // -// security: -// - OAuth2 Bearer: -//   - write:accounts +//	security: +//	- OAuth2 Bearer: +//		- write:accounts  // -// responses: -//   '200': -//     description: "The newly updated account." -//     schema: -//       "$ref": "#/definitions/account" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			description: "The newly updated account." +//			schema: +//				"$ref": "#/definitions/account" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountUpdateCredentialsPATCHHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/accountverify.go b/internal/api/client/account/accountverify.go index e6cb65efd..916d0a322 100644 --- a/internal/api/client/account/accountverify.go +++ b/internal/api/client/account/accountverify.go @@ -31,31 +31,31 @@ import (  //  // Verify a token by returning account details pertaining to it.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// security: -// - OAuth2 Bearer: -//   - read:accounts +//	security: +//	- OAuth2 Bearer: +//		- read:accounts  // -// responses: -//   '200': -//     schema: -//       "$ref": "#/definitions/account" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			schema: +//				"$ref": "#/definitions/account" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountVerifyGETHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/block.go b/internal/api/client/account/block.go index b5f7fdda8..9840c96ab 100644 --- a/internal/api/client/account/block.go +++ b/internal/api/client/account/block.go @@ -32,40 +32,40 @@ import (  //  // Block account with id.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: id -//   type: string -//   description: The id of the account to block. -//   in: path -//   required: true +//	parameters: +//	- +//		name: id +//		type: string +//		description: The id of the account to block. +//		in: path +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - write:blocks +//	security: +//	- OAuth2 Bearer: +//		- write:blocks  // -// responses: -//   '200': -//     name: account relationship -//     description: Your relationship to this account. -//     schema: -//       "$ref": "#/definitions/accountRelationship" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			description: Your relationship to the account. +//			schema: +//				"$ref": "#/definitions/accountRelationship" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountBlockPOSTHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/follow.go b/internal/api/client/account/follow.go index 11bfbf965..cc523a7f8 100644 --- a/internal/api/client/account/follow.go +++ b/internal/api/client/account/follow.go @@ -36,57 +36,58 @@ import (  // The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'.  // The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// consumes: -// - application/json -// - application/xml -// - application/x-www-form-urlencoded +//	consumes: +//	- application/json +//	- application/xml +//	- application/x-www-form-urlencoded  // -// parameters: -// - name: id -//   required: true -//   in: path -//   description: ID of the account to follow. -//   type: string -// - default: true -//   description: Show reblogs from this account. -//   in: formData -//   name: reblogs -//   type: boolean -//   x-go-name: Reblogs -// - default: false -//   description: Notify when this account posts. -//   in: formData -//   name: notify -//   type: boolean -//   x-go-name: Notify +//	parameters: +//	- +//		name: id +//		required: true +//		in: path +//		description: ID of the account to follow. +//		type: string +//	- +//		name: reblogs +//		type: boolean +//		default: true +//		description: Show reblogs from this account. +//		in: formData +//	- +//		default: false +//		description: Notify when this account posts. +//		in: formData +//		name: notify +//		type: boolean  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// security: -// - OAuth2 Bearer: -//   - write:follows +//	security: +//	- OAuth2 Bearer: +//		- write:follows  // -// responses: -//   '200': -//     name: account relationship -//     description: Your relationship to this account. -//     schema: -//       "$ref": "#/definitions/accountRelationship" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			name: account relationship +//			description: Your relationship to this account. +//			schema: +//				"$ref": "#/definitions/accountRelationship" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountFollowPOSTHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/followers.go b/internal/api/client/account/followers.go index beb82a34e..cb2f4bfa6 100644 --- a/internal/api/client/account/followers.go +++ b/internal/api/client/account/followers.go @@ -32,42 +32,43 @@ import (  //  // See followers of account with given id.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: id -//   type: string -//   description: Account ID. -//   in: path -//   required: true +//	parameters: +//	- +//		name: id +//		type: string +//		description: Account ID. +//		in: path +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - read:accounts +//	security: +//	- OAuth2 Bearer: +//		- read:accounts  // -// responses: -//   '200': -//     name: accounts -//     description: Array of accounts that follow this account. -//     schema: -//       type: array -//       items: -//         "$ref": "#/definitions/account" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			name: accounts +//			description: Array of accounts that follow this account. +//			schema: +//				type: array +//				items: +//					"$ref": "#/definitions/account" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountFollowersGETHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/following.go b/internal/api/client/account/following.go index d03bf143d..3d69739c3 100644 --- a/internal/api/client/account/following.go +++ b/internal/api/client/account/following.go @@ -32,42 +32,43 @@ import (  //  // See accounts followed by given account id.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: id -//   type: string -//   description: Account ID. -//   in: path -//   required: true +//	parameters: +//	- +//		name: id +//		type: string +//		description: Account ID. +//		in: path +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - read:accounts +//	security: +//	- OAuth2 Bearer: +//		- read:accounts  // -// responses: -//   '200': -//     name: accounts -//     description: Array of accounts that are followed by this account. -//     schema: -//       type: array -//       items: -//         "$ref": "#/definitions/account" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			name: accounts +//			description: Array of accounts that are followed by this account. +//			schema: +//			type: array +//			items: +//				"$ref": "#/definitions/account" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountFollowingGETHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/relationships.go b/internal/api/client/account/relationships.go index 8facc118c..56159d48e 100644 --- a/internal/api/client/account/relationships.go +++ b/internal/api/client/account/relationships.go @@ -15,44 +15,45 @@ import (  //  // See your account's relationships with the given account IDs.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: id -//   type: array -//   items: -//     type: string -//   description: Account IDs. -//   in: query -//   required: true +//	parameters: +//	- +//		name: id +//		type: array +//		items: +//			type: string +//		description: Account IDs. +//		in: query +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - read:accounts +//	security: +//	- OAuth2 Bearer: +//		- read:accounts  // -// responses: -//   '200': -//     name: account relationships -//     description: Array of account relationships. -//     schema: -//       type: array -//       items: -//         "$ref": "#/definitions/accountRelationship" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			name: account relationships +//			description: Array of account relationships. +//			schema: +//				type: array +//				items: +//					"$ref": "#/definitions/accountRelationship" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountRelationshipsGETHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/statuses.go b/internal/api/client/account/statuses.go index 2f0b804d3..c4c5f67ee 100644 --- a/internal/api/client/account/statuses.go +++ b/internal/api/client/account/statuses.go @@ -36,91 +36,100 @@ import (  //  // The statuses will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer).  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	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: exclude_reblogs -//   type: boolean -//   description: Exclude statuses that are a reblog/boost of 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 -// - name: min_id -//   type: string -//   description: |- -//     Return only statuses *NEWER* than the given min 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, exclude statuses that are not pinned to the given account ID. -//   default: false -//   in: query -//   required: false -// - name: only_media -//   type: boolean -//   description: Show only statuses with media attachments. -//   default: false -//   in: query -//   required: false -// - name: only_public -//   type: boolean -//   description: Show only statuses with a privacy setting of 'public'. -//   default: false -//   in: query -//   required: false +//	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: exclude_reblogs +//		type: boolean +//		description: Exclude statuses that are a reblog/boost of 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 +//	- +//		name: min_id +//		type: string +//		description: >- +//			Return only statuses *NEWER* than the given min 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, exclude statuses that are not pinned to the given account ID. +//		default: false +//		in: query +//		required: false +//	- +//		name: only_media +//		type: boolean +//		description: Show only statuses with media attachments. +//		default: false +//		in: query +//		required: false +//	- +//		name: only_public +//		type: boolean +//		description: Show only statuses with a privacy setting of 'public'. +//		default: false +//		in: query +//		required: false  // -// security: -// - OAuth2 Bearer: -//   - read:accounts +//	security: +//	- OAuth2 Bearer: +//		- read:accounts  // -// responses: -//   '200': -//     name: statuses -//     description: Array of statuses. -//     schema: -//       type: array -//       items: -//         "$ref": "#/definitions/status" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			name: statuses +//			description: Array of statuses. +//			schema: +//				type: array +//				items: +//					"$ref": "#/definitions/status" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountStatusesGETHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, false, false, false, false)  	if err != nil { diff --git a/internal/api/client/account/unblock.go b/internal/api/client/account/unblock.go index 44f3a722c..451b7fd27 100644 --- a/internal/api/client/account/unblock.go +++ b/internal/api/client/account/unblock.go @@ -32,40 +32,41 @@ import (  //  // Unblock account with ID.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: id -//   type: string -//   description: The id of the account to unblock. -//   in: path -//   required: true +//	parameters: +//	- +//		name: id +//		type: string +//		description: The id of the account to unblock. +//		in: path +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - write:blocks +//	security: +//	- OAuth2 Bearer: +//		- write:blocks  // -// responses: -//   '200': -//     name: account relationship -//     description: Your relationship to this account. -//     schema: -//       "$ref": "#/definitions/accountRelationship" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			name: account relationship +//			description: Your relationship to this account. +//			schema: +//				"$ref": "#/definitions/accountRelationship" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountUnblockPOSTHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { diff --git a/internal/api/client/account/unfollow.go b/internal/api/client/account/unfollow.go index d92278f95..fafba99fd 100644 --- a/internal/api/client/account/unfollow.go +++ b/internal/api/client/account/unfollow.go @@ -32,40 +32,41 @@ import (  //  // Unfollow account with id.  // -// --- -// tags: -// - accounts +//	--- +//	tags: +//	- accounts  // -// produces: -// - application/json +//	produces: +//	- application/json  // -// parameters: -// - name: id -//   type: string -//   description: The id of the account to unfollow. -//   in: path -//   required: true +//	parameters: +//	- +//		name: id +//		type: string +//		description: The id of the account to unfollow. +//		in: path +//		required: true  // -// security: -// - OAuth2 Bearer: -//   - write:follows +//	security: +//	- OAuth2 Bearer: +//		- write:follows  // -// responses: -//   '200': -//     name: account relationship -//     description: Your relationship to this account. -//     schema: -//       "$ref": "#/definitions/accountRelationship" -//   '400': -//      description: bad request -//   '401': -//      description: unauthorized -//   '404': -//      description: not found -//   '406': -//      description: not acceptable -//   '500': -//      description: internal server error +//	responses: +//		'200': +//			name: account relationship +//			description: Your relationship to this account. +//			schema: +//		 		"$ref": "#/definitions/accountRelationship" +//		'400': +//			description: bad request +//		'401': +//			description: unauthorized +//		'404': +//			description: not found +//		'406': +//			description: not acceptable +//		'500': +//			description: internal server error  func (m *Module) AccountUnfollowPOSTHandler(c *gin.Context) {  	authed, err := oauth.Authed(c, true, true, true, true)  	if err != nil { | 
