openapi

package
v4.0.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 5 Imported by: 0

README

Go API client for

The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender.

SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up.

See the warmup schedule to learn how SendGrid limits your email traffic for IPs in warmup.

You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the IP Addresses settings menu in the Twilio SendGrid application user interface.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/sendgrid-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version:
  • Build date: 2024-10-24T13:26:01.714941Z[Etc/UTC]
  • Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit https://support.sendgrid.com/hc/en-us

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./"

Documentation for API Endpoints

All URIs are relative to https://api.sendgrid.com

Class Method HTTP request Description
GetWarmUpIp GetWarmUpIp Get /v3/ips/warmup/{IpAddress} Retrieve the warmup status for a specific IP address
ListWarmUpIp ListWarmUpIp Get /v3/ips/warmup Retrieve all IPs currently in warmup
StopIpWarmUp StopIpWarmUp Delete /v3/ips/warmup/{IpAddress} Stop warming up an IP address
WarmUpIp WarmUpIp Post /v3/ips/warmup Start warming up an IP address

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiService

type ApiService struct {
	// contains filtered or unexported fields
}

func NewApiService

func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService

func NewApiServiceWithClient

func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService

func (*ApiService) GetWarmUpIp

func (c *ApiService) GetWarmUpIp(params *GetWarmUpIpParam) (interface{}, error)

**This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the \"Retrieve all IPs currently in warmup\" endpoint.

func (*ApiService) ListWarmUpIp

func (c *ApiService) ListWarmUpIp() (interface{}, error)

**This endpoint allows you to retrieve all of your IP addresses that are currently warming up.**

func (*ApiService) StopIpWarmUp

func (c *ApiService) StopIpWarmUp(params *StopIpWarmUpParam) (interface{}, error)

**This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the \"Retrieve the warmpup status for a specific IP address\" endpoint.

func (*ApiService) WarmUpIp

func (c *ApiService) WarmUpIp(params *WarmUpIpParam) (interface{}, error)

**This endpoint allows you to put an IP address into warmup mode.**

type GetWarmUpIp404Response

type GetWarmUpIp404Response struct {
	// The errors that were encountered.
	Errors *[]GetWarmUpIp404ResponseErrorsInner `json:"errors,omitempty"`
}

GetWarmUpIp404Response struct for GetWarmUpIp404Response

type GetWarmUpIp404ResponseErrorsInner

type GetWarmUpIp404ResponseErrorsInner struct {
	Field *string `json:"field,omitempty"`
	// A message explaining why the warmup status could not be retrieved.
	Message *string `json:"message,omitempty"`
}

GetWarmUpIp404ResponseErrorsInner struct for GetWarmUpIp404ResponseErrorsInner

type GetWarmUpIpParam

type GetWarmUpIpParam struct {
	// The IP address that you want to retrieve the warmup status for.
	IpAddress *string `json:"ip_address"`
}

func (*GetWarmUpIpParam) SetIpAddress

func (params *GetWarmUpIpParam) SetIpAddress(IpAddress string) *GetWarmUpIpParam

type IpWarmup200Inner

type IpWarmup200Inner struct {
	// The IP address.
	Ip string `json:"ip"`
	// A Unix timestamp indicating when the IP address entered warmup mode.
	StartDate int32 `json:"start_date"`
}

IpWarmup200Inner struct for IpWarmup200Inner

type ListWarmUpIpParam

type ListWarmUpIpParam struct {
}

type StopIpWarmUp404Response

type StopIpWarmUp404Response struct {
	// The errors that were encountered.
	Errors *[]StopIpWarmUp404ResponseErrorsInner `json:"errors,omitempty"`
}

StopIpWarmUp404Response struct for StopIpWarmUp404Response

type StopIpWarmUp404ResponseErrorsInner

type StopIpWarmUp404ResponseErrorsInner struct {
	Field *string `json:"field,omitempty"`
	// A message explaining why the IP couldn't be removed from warmup.
	Message *string `json:"message,omitempty"`
}

StopIpWarmUp404ResponseErrorsInner struct for StopIpWarmUp404ResponseErrorsInner

type StopIpWarmUpParam

type StopIpWarmUpParam struct {
	// The IP address that you want to retrieve the warmup status for.
	IpAddress *string `json:"ip_address"`
}

func (*StopIpWarmUpParam) SetIpAddress

func (params *StopIpWarmUpParam) SetIpAddress(IpAddress string) *StopIpWarmUpParam

type WarmUpIp404Response

type WarmUpIp404Response struct {
	// The errors that were encountered.
	Errors *[]WarmUpIp404ResponseErrorsInner `json:"errors,omitempty"`
}

WarmUpIp404Response struct for WarmUpIp404Response

type WarmUpIp404ResponseErrorsInner

type WarmUpIp404ResponseErrorsInner struct {
	Field *string `json:"field,omitempty"`
	// A message explaining why the IP couldn't entered into warmup mode.
	Message *string `json:"message,omitempty"`
}

WarmUpIp404ResponseErrorsInner struct for WarmUpIp404ResponseErrorsInner

type WarmUpIpParam

type WarmUpIpParam struct {
	//
	WarmUpIpRequest *WarmUpIpRequest `json:"WarmUpIpRequest,omitempty"`
}

func (*WarmUpIpParam) SetWarmUpIpRequest

func (params *WarmUpIpParam) SetWarmUpIpRequest(WarmUpIpRequest WarmUpIpRequest) *WarmUpIpParam

type WarmUpIpRequest

type WarmUpIpRequest struct {
	// The IP address that you want to begin warming up.
	Ip *string `json:"ip,omitempty"`
}

WarmUpIpRequest struct for WarmUpIpRequest

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL