diff options
author | 2021-07-31 17:49:59 +0200 | |
---|---|---|
committer | 2021-07-31 17:49:59 +0200 | |
commit | 58dddd86e0ddbb0c6aa54506dcef162321babfbb (patch) | |
tree | ee83cec11f05dfe1e397b9303fe5cd7c2273d4f3 /internal/api/model/application.go | |
parent | Password change (#123) (diff) | |
download | gotosocial-58dddd86e0ddbb0c6aa54506dcef162321babfbb.tar.xz |
Swagger (#124)
* start experimenting with swagger documentation
* further adventures in swagger
* do a few more api paths
* account paths documented
* go fmt
* fix up some models
* bit o lintin'
Diffstat (limited to 'internal/api/model/application.go')
-rw-r--r-- | internal/api/model/application.go | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/internal/api/model/application.go b/internal/api/model/application.go index fe9fada03..6f949ec3e 100644 --- a/internal/api/model/application.go +++ b/internal/api/model/application.go @@ -18,23 +18,28 @@ package model -// Application represents a mastodon-api Application, as defined here: https://docs.joinmastodon.org/entities/application/. +// Application represents an api Application, as defined here. // Primarily, application is used for allowing apps like Tusky etc to connect to Mastodon on behalf of a user. -// See https://docs.joinmastodon.org/methods/apps/ +// +// swagger:model application type Application struct { - // The application ID in the db + // The ID of the application. + // example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` - // The name of your application. + // The name of the application. + // example: Tusky Name string `json:"name"` - // The website associated with your application (url) + // The website associated with the application (url) + // example: https://tusky.app Website string `json:"website,omitempty"` - // Where the user should be redirected after authorization. + // Post-authorization redirect URI for the application (OAuth2). + // example: https://example.org/callback?some=query RedirectURI string `json:"redirect_uri,omitempty"` - // ClientID to use when obtaining an oauth token for this application (ie., in client_id parameter of https://docs.joinmastodon.org/methods/apps/) + // Client ID associated with this application. ClientID string `json:"client_id,omitempty"` - // Client secret to use when obtaining an auth token for this application (ie., in client_secret parameter of https://docs.joinmastodon.org/methods/apps/) + // Client secret associated with this application. ClientSecret string `json:"client_secret,omitempty"` - // Used for Push Streaming API. Returned with POST /api/v1/apps. Equivalent to https://docs.joinmastodon.org/entities/pushsubscription/#server_key + // Push API key for this application. VapidKey string `json:"vapid_key,omitempty"` } |