Skip to content

Latest commit

 

History

History
213 lines (133 loc) · 5.68 KB

OAuthClientsApi.md

File metadata and controls

213 lines (133 loc) · 5.68 KB

\OAuthClientsApi

All URIs are relative to http://localhost

Method HTTP request Description
CreateOAuthClient Post /api/v1/add/oauth2-client Create oAuth Client
DeleteOAuthClient Post /api/v1/delete/oauth2-client Delete oAuth Client
GetOAuthClients Get /api/v1/get/oauth2-client/{id} Get oAuth Clients

CreateOAuthClient

CreateAlias200Response CreateOAuthClient(ctx).CreateOAuthClientRequest(createOAuthClientRequest).Execute()

Create oAuth Client

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/shoopea/mailcow-go"
)

func main() {
    createOAuthClientRequest := *openapiclient.NewCreateOAuthClientRequest() // CreateOAuthClientRequest |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OAuthClientsApi.CreateOAuthClient(context.Background()).CreateOAuthClientRequest(createOAuthClientRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsApi.CreateOAuthClient``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateOAuthClient`: CreateAlias200Response
    fmt.Fprintf(os.Stdout, "Response from `OAuthClientsApi.CreateOAuthClient`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateOAuthClientRequest struct via the builder pattern

Name Type Description Notes
createOAuthClientRequest CreateOAuthClientRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteOAuthClient

CreateAlias200Response DeleteOAuthClient(ctx).DeleteOAuthClientRequest(deleteOAuthClientRequest).Execute()

Delete oAuth Client

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/shoopea/mailcow-go"
)

func main() {
    deleteOAuthClientRequest := *openapiclient.NewDeleteOAuthClientRequest() // DeleteOAuthClientRequest |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OAuthClientsApi.DeleteOAuthClient(context.Background()).DeleteOAuthClientRequest(deleteOAuthClientRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsApi.DeleteOAuthClient``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteOAuthClient`: CreateAlias200Response
    fmt.Fprintf(os.Stdout, "Response from `OAuthClientsApi.DeleteOAuthClient`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDeleteOAuthClientRequest struct via the builder pattern

Name Type Description Notes
deleteOAuthClientRequest DeleteOAuthClientRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetOAuthClients

GetOAuthClients(ctx, id).XAPIKey(xAPIKey).Execute()

Get oAuth Clients

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/shoopea/mailcow-go"
)

func main() {
    id := "all" // string | id of entry you want to get
    xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OAuthClientsApi.GetOAuthClients(context.Background(), id).XAPIKey(xAPIKey).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsApi.GetOAuthClients``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string id of entry you want to get

Other Parameters

Other parameters are passed through a pointer to a apiGetOAuthClientsRequest struct via the builder pattern

Name Type Description Notes

xAPIKey | string | e.g. api-key-string |

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]