mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
3.1 KiB
3.1 KiB
\MeAPI
All URIs are relative to http://localhost:8080/api/v1
| Method | HTTP request | Description |
|---|---|---|
| GetMe | Get /me | Get current user profile |
| UpdateMe | Patch /me | Update current user profile |
GetMe
HandlersMeResponse GetMe(ctx).Execute()
Get current user profile
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MeAPI.GetMe(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMe``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMe`: HandlersMeResponse
fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMe`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetMeRequest struct via the builder pattern
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateMe
ModelsUser UpdateMe(ctx).Body(body).Execute()
Update current user profile
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk-go"
)
func main() {
body := *openapiclient.NewHandlersUpdateMeRequest() // HandlersUpdateMeRequest | Patch profile
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MeAPI.UpdateMe(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.UpdateMe``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateMe`: ModelsUser
fmt.Fprintf(os.Stdout, "Response from `MeAPI.UpdateMe`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiUpdateMeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | HandlersUpdateMeRequest | Patch profile |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]