Skip to content

Latest commit

 

History

History
284 lines (178 loc) · 7.7 KB

RatelimitsApi.md

File metadata and controls

284 lines (178 loc) · 7.7 KB

\RatelimitsApi

All URIs are relative to http://localhost

Method HTTP request Description
EditDomainRatelimits Post /api/v1/edit/rl-domain/ Edit domain ratelimits
EditMailboxRatelimits Post /api/v1/edit/rl-mbox/ Edit mailbox ratelimits
GetDomainRatelimits Get /api/v1/get/rl-domain/{domain} Get domain ratelimits
GetMailboxRatelimits Get /api/v1/get/rl-mbox/{mailbox} Get mailbox ratelimits

EditDomainRatelimits

CreateAlias200Response EditDomainRatelimits(ctx).EditDomainRatelimitsRequest(editDomainRatelimitsRequest).Execute()

Edit domain ratelimits

Example

package main

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

func main() {
    editDomainRatelimitsRequest := *openapiclient.NewEditDomainRatelimitsRequest() // EditDomainRatelimitsRequest |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
editDomainRatelimitsRequest EditDomainRatelimitsRequest

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]

EditMailboxRatelimits

CreateAlias200Response EditMailboxRatelimits(ctx).EditMailboxRatelimitsRequest(editMailboxRatelimitsRequest).Execute()

Edit mailbox ratelimits

Example

package main

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

func main() {
    editMailboxRatelimitsRequest := *openapiclient.NewEditMailboxRatelimitsRequest() // EditMailboxRatelimitsRequest |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
editMailboxRatelimitsRequest EditMailboxRatelimitsRequest

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]

GetDomainRatelimits

GetDomainRatelimits(ctx, domain).XAPIKey(xAPIKey).Execute()

Get domain ratelimits

Example

package main

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

func main() {
    domain := "domain_example" // string | name of domain or all
    xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.RatelimitsApi.GetDomainRatelimits(context.Background(), domain).XAPIKey(xAPIKey).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RatelimitsApi.GetDomainRatelimits``: %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.
domain string name of domain or all

Other Parameters

Other parameters are passed through a pointer to a apiGetDomainRatelimitsRequest 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]

GetMailboxRatelimits

GetMailboxRatelimits(ctx, mailbox).XAPIKey(xAPIKey).Execute()

Get mailbox ratelimits

Example

package main

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

func main() {
    mailbox := "mailbox_example" // string | name of mailbox or all
    xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.RatelimitsApi.GetMailboxRatelimits(context.Background(), mailbox).XAPIKey(xAPIKey).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RatelimitsApi.GetMailboxRatelimits``: %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.
mailbox string name of mailbox or all

Other Parameters

Other parameters are passed through a pointer to a apiGetMailboxRatelimitsRequest 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]