interactionrequests

package
v0.17.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

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

Processor wraps functionality for getting, accepting, and rejecting interaction requests.

func New

func New(
	common *common.Processor,
	state *state.State,
	converter *typeutils.Converter,
) Processor

New returns a new interaction requests processor.

func (*Processor) Accept

Accept accepts an interaction request with the given ID, on behalf of the given account (whose post it must target).

func (*Processor) GetOne

GetOne returns one interaction request with the given ID.

func (*Processor) GetPage

func (p *Processor) GetPage(
	ctx context.Context,
	requester *gtsmodel.Account,
	statusID string,
	likes bool,
	replies bool,
	boosts bool,
	page *paging.Page,
) (*apimodel.PageableResponse, gtserror.WithCode)

GetPage returns a page of interaction requests targeting the requester and (optionally) the given status ID.

func (*Processor) Reject

Reject rejects an interaction request with the given ID, on behalf of the given account (whose post it must target).

Jump to

Keyboard shortcuts

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