All URIs are relative to https://api.elasticemail.com/v4
| Method | HTTP request | Description |
|---|---|---|
| StatisticsCampaignsByNameGet | Get /statistics/campaigns/{name} | Load Campaign Stats |
| StatisticsCampaignsGet | Get /statistics/campaigns | Load Campaigns Stats |
| StatisticsChannelsByNameGet | Get /statistics/channels/{name} | Load Channel Stats |
| StatisticsChannelsGet | Get /statistics/channels | Load Channels Stats |
| StatisticsGet | Get /statistics | Load Statistics |
ChannelLogStatusSummary StatisticsCampaignsByNameGet(ctx, name).Execute()
Load Campaign Stats
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | The name of the campaign to get.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StatisticsAPI.StatisticsCampaignsByNameGet(context.Background(), name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatisticsAPI.StatisticsCampaignsByNameGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StatisticsCampaignsByNameGet`: ChannelLogStatusSummary
fmt.Fprintf(os.Stdout, "Response from `StatisticsAPI.StatisticsCampaignsByNameGet`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| name | string | The name of the campaign to get. |
Other parameters are passed through a pointer to a apiStatisticsCampaignsByNameGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ChannelLogStatusSummary StatisticsCampaignsGet(ctx).Limit(limit).Offset(offset).Execute()
Load Campaigns Stats
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
limit := int32(100) // int32 | Maximum number of returned items. (optional)
offset := int32(20) // int32 | How many items should be returned ahead. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StatisticsAPI.StatisticsCampaignsGet(context.Background()).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatisticsAPI.StatisticsCampaignsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StatisticsCampaignsGet`: []ChannelLogStatusSummary
fmt.Fprintf(os.Stdout, "Response from `StatisticsAPI.StatisticsCampaignsGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiStatisticsCampaignsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int32 | Maximum number of returned items. | |
| offset | int32 | How many items should be returned ahead. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChannelLogStatusSummary StatisticsChannelsByNameGet(ctx, name).Execute()
Load Channel Stats
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | The name of the channel to get.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StatisticsAPI.StatisticsChannelsByNameGet(context.Background(), name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatisticsAPI.StatisticsChannelsByNameGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StatisticsChannelsByNameGet`: ChannelLogStatusSummary
fmt.Fprintf(os.Stdout, "Response from `StatisticsAPI.StatisticsChannelsByNameGet`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| name | string | The name of the channel to get. |
Other parameters are passed through a pointer to a apiStatisticsChannelsByNameGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ChannelLogStatusSummary StatisticsChannelsGet(ctx).Limit(limit).Offset(offset).Execute()
Load Channels Stats
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
limit := int32(100) // int32 | Maximum number of returned items. (optional)
offset := int32(20) // int32 | How many items should be returned ahead. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StatisticsAPI.StatisticsChannelsGet(context.Background()).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatisticsAPI.StatisticsChannelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StatisticsChannelsGet`: []ChannelLogStatusSummary
fmt.Fprintf(os.Stdout, "Response from `StatisticsAPI.StatisticsChannelsGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiStatisticsChannelsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int32 | Maximum number of returned items. | |
| offset | int32 | How many items should be returned ahead. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LogStatusSummary StatisticsGet(ctx).From(from).To(to).Execute()
Load Statistics
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
from := time.Now() // time.Time | Starting date for search in YYYY-MM-DDThh:mm:ss format.
to := time.Now() // time.Time | Ending date for search in YYYY-MM-DDThh:mm:ss format. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StatisticsAPI.StatisticsGet(context.Background()).From(from).To(to).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatisticsAPI.StatisticsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StatisticsGet`: LogStatusSummary
fmt.Fprintf(os.Stdout, "Response from `StatisticsAPI.StatisticsGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiStatisticsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| from | time.Time | Starting date for search in YYYY-MM-DDThh:mm:ss format. | |
| to | time.Time | Ending date for search in YYYY-MM-DDThh:mm:ss format. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]