// List function to get Adgroups from campaign
List function to get Adgroups from campaign
// List function to get Adgroups from campaign
func (s *CampaignNegativeKeywordService) List(ctx context.Context, campaignID int64, opt *ListOptions) ([]*NegativeKeyword, *Response, error) {
	if campaignID == 0 {
		return nil, nil, fmt.Errorf("campaignID can not be 0")
	}
	u, err := addOptions(fmt.Sprintf("campaigns/%d/negativekeywords", campaignID), opt)
	if err != nil {
		return nil, nil, err
	}
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}
	negativekeywords := []*NegativeKeyword{}
	resp, err := s.client.Do(ctx, req, &negativekeywords)
	if err != nil {
		return nil, resp, err
	}
	return negativekeywords, resp, nil
}
func ( s * CampaignNegativeKeywordService ) List ( ctx context . Context , campaignID int64 , opt * ListOptions ) ( [ ] * NegativeKeyword , * Response , error ) { if campaignID == 0 { return nil , nil , fmt . Errorf ( " " ) } u , err := addOptions ( fmt . Sprintf ( " " , campaignID ) , opt ) if err != nil { return nil , nil , err } req , err := s . client . NewRequest ( " " , u , nil ) if err != nil { return nil , nil , err } negativekeywords := [ ] * NegativeKeyword { } resp , err := s . client . Do ( ctx , req , & negativekeywords ) if err != nil { return nil , resp , err } return negativekeywords , resp , nil }
List function to get Adgroups from campaign
List function to get Adgroups from campaign