summaryrefslogtreecommitdiff
path: root/internal/api/model/application.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-31 17:49:59 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-31 17:49:59 +0200
commit58dddd86e0ddbb0c6aa54506dcef162321babfbb (patch)
treeee83cec11f05dfe1e397b9303fe5cd7c2273d4f3 /internal/api/model/application.go
parentPassword change (#123) (diff)
downloadgotosocial-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.go23
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"`
}