All URIs are relative to https://server.api.mailchimp.com/3.0
Method | HTTP request | Description |
---|---|---|
GetSearchCampaigns | Get /search-campaigns | Search campaigns |
Campaigns GetSearchCampaigns(ctx).Query(query).Fields(fields).ExcludeFields(excludeFields).Execute()
Search campaigns
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/Hevelop/go-client-mailchimp-marketing-api"
)
func main() {
query := "query_example" // string | The search query used to filter results.
fields := []string{"Inner_example"} // []string | A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. (optional)
excludeFields := []string{"Inner_example"} // []string | A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SearchCampaignsAPI.GetSearchCampaigns(context.Background()).Query(query).Fields(fields).ExcludeFields(excludeFields).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SearchCampaignsAPI.GetSearchCampaigns``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSearchCampaigns`: Campaigns
fmt.Fprintf(os.Stdout, "Response from `SearchCampaignsAPI.GetSearchCampaigns`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetSearchCampaignsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
query | string | The search query used to filter results. | |
fields | []string | A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation. | |
excludeFields | []string | A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation. |
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]