interactionrequests

package
v0.17.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BasePath       = "/v1/interaction_requests"
	BasePathWithID = BasePath + "/:" + apiutil.IDKey
	AuthorizePath  = BasePathWithID + "/authorize"
	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) InteractionRequestAuthorizePOSTHandler

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

InteractionRequestAuthorizePOSTHandler swagger:operation POST /api/v1/interaction_requests/{id}/authorize authorizeInteractionRequest

Accept/authorize/approve an interaction request with the given ID.

---
tags:
- interaction_requests

produces:
- application/json

parameters:
-
	name: id
	type: string
	description: ID of the interaction request targeting you.
	in: path
	required: true

security:
- OAuth2 Bearer:
	- write:statuses

responses:
	'200':
		name: Approval.
		description: The now-approved interaction request.
		schema:
			"$ref": "#/definitions/interactionRequest"
	'400':
		description: bad request
	'401':
		description: unauthorized
	'404':
		description: not found
	'406':
		description: not acceptable
	'500':
		description: internal server error

func (*Module) InteractionRequestGETHandler

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

InteractionRequestGETHandler swagger:operation GET /api/v1/interaction_requests/{id} getInteractionRequest

Get interaction request with the given ID.

---
tags:
- interaction_requests

produces:
- application/json

parameters:
-
	name: id
	type: string
	description: ID of the interaction request targeting you.
	in: path
	required: true

security:
- OAuth2 Bearer:
	- read:notifications

responses:
	'200':
		description: Interaction request.
		schema:
			"$ref": "#/definitions/interactionRequest"
	'400':
		description: bad request
	'401':
		description: unauthorized
	'404':
		description: not found
	'406':
		description: not acceptable
	'500':
		description: internal server error

func (*Module) InteractionRequestRejectPOSTHandler

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

InteractionRequestRejectPOSTHandler swagger:operation POST /api/v1/interaction_requests/{id}/reject rejectInteractionRequest

Reject an interaction request with the given ID.

---
tags:
- interaction_requests

produces:
- application/json

parameters:
-
	name: id
	type: string
	description: ID of the interaction request targeting you.
	in: path
	required: true

security:
- OAuth2 Bearer:
	- write:statuses

responses:
	'200':
		name: Rejection.
		description: The now-rejected interaction request.
		schema:
			"$ref": "#/definitions/interactionRequest"
	'400':
		description: bad request
	'401':
		description: unauthorized
	'404':
		description: not found
	'406':
		description: not acceptable
	'500':
		description: internal server error

func (*Module) InteractionRequestsGETHandler

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

InteractionRequestsGETHandler swagger:operation GET /api/v1/interaction_requests getInteractionRequests

Get an array of interactions requested on your statuses by other accounts, and pending your approval.

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

---
tags:
- interaction_requests

produces:
- application/json

parameters:
-
	name: status_id
	type: string
	description: >-
		If set, then only interactions targeting the given status_id will be included in the results.
	in: query
	required: false
-
	name: favourites
	type: boolean
	description: >-
		If true or not set, pending favourites will be included in the results.
		At least one of favourites, replies, and reblogs must be true.
	in: query
	required: false
	default: true
-
	name: replies
	type: boolean
	description: >-
		If true or not set, pending replies will be included in the results.
		At least one of favourites, replies, and reblogs must be true.
	in: query
	required: false
	default: true
-
	name: reblogs
	type: boolean
	description: >-
		If true or not set, pending reblogs will be included in the results.
		At least one of favourites, replies, and reblogs must be true.
	in: query
	required: false
	default: true
-
	name: max_id
	type: string
	description: >-
		Return only interaction requests *OLDER* than the given max ID.
		The interaction with the specified ID will not be included in the response.
	in: query
	required: false
-
	name: since_id
	type: string
	description: >-
		Return only interaction requests *NEWER* than the given since ID.
		The interaction with the specified ID will not be included in the response.
	in: query
	required: false
-
	name: min_id
	type: string
	description: >-
		Return only interaction requests *IMMEDIATELY NEWER* than the given min ID.
		The interaction with the specified ID will not be included in the response.
	in: query
	required: false
-
	name: limit
	type: integer
	description: Number of interaction requests to return.
	default: 40
	minimum: 1
	maximum: 80
	in: query
	required: false

security:
- OAuth2 Bearer:
	- read:notifications

responses:
	'200':
		headers:
			Link:
				type: string
				description: Links to the next and previous queries.
		schema:
			type: array
			items:
				"$ref": "#/definitions/interactionRequest"
	'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