// List function to get Campaigns
List function to get Campaigns
// List function to get Campaigns
func (s *CampaignService) List(ctx context.Context, opt *ListOptions) ([]*Campaign, *Response, error) {
	u, err := addOptions("campaigns", opt)
	if err != nil {
		return nil, nil, err
	}
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}
	campaigns := []*Campaign{}
	resp, err := s.client.Do(ctx, req, &campaigns)
	if err != nil {
		return nil, resp, err
	}
	return campaigns, resp, nil
}
func ( s * CampaignService ) List ( ctx context . Context , opt * ListOptions ) ( [ ] * Campaign , * Response , error ) { u , err := addOptions ( " " , opt ) if err != nil { return nil , nil , err } req , err := s . client . NewRequest ( " " , u , nil ) if err != nil { return nil , nil , err } campaigns := [ ] * Campaign { } resp , err := s . client . Do ( ctx , req , & campaigns ) if err != nil { return nil , resp , err } return campaigns , resp , nil }
List function to get Campaigns
List function to get Campaigns