preferences

package
v0.17.0-rc2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// BasePath is the base URI path for serving preferences, minus the api prefix.
	BasePath = "/v1/preferences"
)

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) PreferencesGETHandler

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

PreferencesGETHandler swagger:operation GET /api/v1/preferences preferencesGet

Return an object of user preferences.

Example:

```

{
	 "posting:default:visibility": "public",
	 "posting:default:sensitive": false,
	 "posting:default:language": "en",
	 "reading:expand:media": "default",
	 "reading:expand:spoilers": false,
	 "reading:autoplay:gifs": false
}

````

---
tags:
- preferences

produces:
- application/json

security:
- OAuth2 Bearer:
	- read:accounts

responses:
	'200':
		schema:
			type: object
	'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