Updated API Code Samples (#24141)
* api: remove PHP code samples * api: remove Curl code samples * api: remove Go code samples * link out to marketplace exclusively for community-built drivers * absolute path to V4_SRC * programmatically extract x-codeSamples * initial batch of examples * Update api/server/main.go Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com> * Update api/server/main.go Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com> * Update api/server/main.go Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com> * updated examples --------- Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
72b648cf81
Коммит
885802eae7
@@ -209,26 +209,6 @@
|
||||
$ref: "#/components/responses/NotFound"
|
||||
"501":
|
||||
$ref: "#/components/responses/NotImplemented"
|
||||
x-code-samples:
|
||||
- lang: Go
|
||||
source: |
|
||||
import "github.com/mattermost/mattermost-server/v5/model"
|
||||
|
||||
Client := model.NewAPIv4Client("https://your-mattermost-url.com")
|
||||
Client.Login("email@domain.com", "Password1")
|
||||
|
||||
appToUpdate := &model.OAuthApp{
|
||||
Id: <APP ID>,
|
||||
Name: <APP NAME>,
|
||||
Description: <APP DESCRIPTION>,
|
||||
IconURL: <URL TO APP ICON>,
|
||||
CallbackUrls: [<CALLBACK URL1>, <CALLBACK URL2>],
|
||||
Homepage: <URL TO APP HOMEPAGE>,
|
||||
IsTrusted: <BOOLEAN>
|
||||
}
|
||||
|
||||
// UpdateOAuthApp
|
||||
updatedApp, resp := Client.UpdateOAuthApp(appToUpdate)
|
||||
delete:
|
||||
tags:
|
||||
- OAuth
|
||||
|
||||
Ссылка в новой задаче
Block a user