followrequests

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IDKey is for account IDs
	IDKey = "id"
	// BasePath is the base path for serving the follow request API, minus the 'api' prefix
	BasePath = "/v1/follow_requests"
	// BasePathWithID is just the base path with the ID key in it.
	// Use this anywhere you need to know the ID of the account that owns the follow request being queried.
	BasePathWithID = BasePath + "/:" + IDKey
	// AuthorizePath is used for authorizing follow requests
	AuthorizePath = BasePathWithID + "/authorize"
	// RejectPath is used for rejecting follow requests
	RejectPath = BasePathWithID + "/reject"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

func New

func New(processor *processing.Processor) *Module

func (*Module) FollowRequestAuthorizePOSTHandler

func (m *Module) FollowRequestAuthorizePOSTHandler(c *gin.Context)

FollowRequestAuthorizePOSTHandler swagger:operation POST /api/v1/follow_requests/{account_id}/authorize authorizeFollowRequest

Accept/authorize follow request from the given account ID.

Accept a follow request and put the requesting account in your 'followers' list.

---
tags:
- follow_requests

produces:
- application/json

parameters:
-
	name: account_id
	type: string
	description: ID of the account requesting to follow you.
	in: path
	required: true

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

func (*Module) FollowRequestGETHandler

func (m *Module) FollowRequestGETHandler(c *gin.Context)

FollowRequestGETHandler swagger:operation GET /api/v1/follow_requests getFollowRequests

Get an array of accounts that have requested to follow you.

The next and previous queries can be parsed from the returned Link header. Example:

``` <https://example.org/api/v1/follow_requests?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/follow_requests?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev" ````

---
tags:
- follow_requests

produces:
- application/json

parameters:
-
	name: max_id
	type: string
	description: >-
		Return only follow requesting accounts *OLDER* than the given max ID.
		The follow requester with the specified ID will not be included in the response.
		NOTE: the ID is of the internal follow request, NOT any of the returned accounts.
	in: query
	required: false
-
	name: since_id
	type: string
	description: >-
		Return only follow requesting accounts *NEWER* than the given since ID.
		The follow requester with the specified ID will not be included in the response.
		NOTE: the ID is of the internal follow request, NOT any of the returned accounts.
	in: query
	required: false
-
	name: min_id
	type: string
	description: >-
		Return only follow requesting accounts *IMMEDIATELY NEWER* than the given min ID.
		The follow requester with the specified ID will not be included in the response.
		NOTE: the ID is of the internal follow request, NOT any of the returned accounts.
	in: query
	required: false
-
	name: limit
	type: integer
	description: Number of follow requesting accounts to return.
	default: 40
	minimum: 1
	maximum: 80
	in: query
	required: false

security:
- OAuth2 Bearer:
	- read:follows

responses:
	'200':
		headers:
			Link:
				type: string
				description: Links to the next and previous queries.
		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 (*Module) FollowRequestRejectPOSTHandler

func (m *Module) FollowRequestRejectPOSTHandler(c *gin.Context)

FollowRequestRejectPOSTHandler swagger:operation POST /api/v1/follow_requests/{account_id}/reject rejectFollowRequest

Reject/deny follow request from the given account ID.

---
tags:
- follow_requests

produces:
- application/json

parameters:
-
	name: account_id
	type: string
	description: ID of the account requesting to follow you.
	in: path
	required: true

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

func (*Module) Route

func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL