Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Endpoint Unione API endpoint. Endpoint = "https://one.unisender.com" // DefaultLanguage default API language. DefaultLanguage = "en" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // LanguageEn sets API response language to English (default). LanguageEn() Client // LanguageRu sets API response language to Russian. LanguageRu() Client // Client setter for custom http client. Client(client *http.Client) Client // Send sends transactional email to recipients. // // See: https://one.unisender.com/en/docs/page/send Send(m message.Message) (success []string, failed map[string]error, err error) }
Client Unione API client interface.
type Response ¶
type Response struct { // Status specifies if the request was successful. Status string `json:"status"` // JobID unique identifier of the executed sending. JobID string `json:"job_id,omitempty"` // Emails array, contains the email addresses where the sending was successful. Emails []string `json:"emails,omitempty"` // FailedEmails object, contains emails to which the sending for some reasons has not been carried out. // The object is filled in format: “address” : “state” FailedEmails map[string]string `json:"failed_emails,omitempty"` // Code API error code. // See: https://one.unisender.com/en/docs/page/Error_Codes Code int `json:"code,omitempty"` // Message API error message. Message string `json:"message,omitempty"` }
Response Unione API response object.
Click to show internal directories.
Click to hide internal directories.