apps

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasePath       = "/v1/apps"
	BasePathWithID = BasePath + "/:" + apiutil.IDKey
)

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

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

AppDELETEHandler swagger:operation DELETE /api/v1/apps/{id} appDelete

Delete a single application managed by the requester.

---
tags:
- apps

produces:
- application/json

parameters:
-
	name: id
	type: string
	description: The id of the application to delete.
	in: path
	required: true

security:
- OAuth2 Bearer:
	- write:applications

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

func (*Module) AppGETHandler

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

AppGETHandler swagger:operation GET /api/v1/apps/{id} appGet

Get a single application managed by the requester.

---
tags:
- apps

produces:
- application/json

parameters:
-
	name: id
	type: string
	description: The id of the requested application.
	in: path
	required: true

security:
- OAuth2 Bearer:
	- read:applications

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

func (*Module) AppsGETHandler

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

AppsGETHandler swagger:operation GET /api/v1/apps appsGet

Get an array of applications that are managed by the requester.

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

Example:

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

---
tags:
- apps

produces:
- application/json

parameters:
-
	name: max_id
	type: string
	description: >-
		Return only items *OLDER* than the given max item ID.
		The item with the specified ID will not be included in the response.
	in: query
	required: false
-
	name: since_id
	type: string
	description: >-
		Return only items *newer* than the given since item ID.
		The item with the specified ID will not be included in the response.
	in: query
-
	name: min_id
	type: string
	description: >-
		Return only items *immediately newer* than the given since item ID.
		The item with the specified ID will not be included in the response.
	in: query
	required: false
-
	name: limit
	type: integer
	description: Number of items to return.
	default: 20
	in: query
	required: false
	max: 80
	min: 0

security:
- OAuth2 Bearer:
	- read:applications

responses:
	'200':
		headers:
			Link:
				type: string
				description: Links to the next and previous queries.
		schema:
			type: array
			items:
				"$ref": "#/definitions/application"
	'400':
		schema:
			"$ref": "#/definitions/error"
		description: bad request
	'401':
		schema:
			"$ref": "#/definitions/error"
		description: unauthorized
	'404':
		schema:
			"$ref": "#/definitions/error"
		description: not found
	'406':
		schema:
			"$ref": "#/definitions/error"
		description: not acceptable
	'500':
		schema:
			"$ref": "#/definitions/error"
		description: internal server error

func (*Module) AppsPOSTHandler

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

AppsPOSTHandler swagger:operation POST /api/v1/apps appCreate

Register a new application on this instance.

The registered application can be used to obtain an application token. This can then be used to register a new account, or (through user auth) obtain an access token.

If the application was registered with a Bearer token passed in the Authorization header, the created application will be managed by the authenticated user (must have scope write:applications).

Parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. Parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'.

---
tags:
- apps

consumes:
- application/json
- application/xml
- application/x-www-form-urlencoded

produces:
- application/json

responses:
	'200':
		description: "The newly-created application."
		schema:
			"$ref": "#/definitions/application"
	'400':
		schema:
			"$ref": "#/definitions/error"
		description: bad request
	'401':
		schema:
			"$ref": "#/definitions/error"
		description: unauthorized
	'403':
		schema:
			"$ref": "#/definitions/error"
		description: forbidden
	'404':
		schema:
			"$ref": "#/definitions/error"
		description: not found
	'406':
		schema:
			"$ref": "#/definitions/error"
		description: not acceptable
	'500':
		schema:
			"$ref": "#/definitions/error"
		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