// Fetches all Creative Sets assigned to ad groups.
Fetches all Creative Sets assigned to ad groups.
// Fetches all Creative Sets assigned to ad groups .
func (s *CreativeSetService) List(ctx context.Context, campaignID int64, opt *Selector) ([]*CreativeSet, *Response, error) {
	if campaignID == 0 {
		return nil, nil, fmt.Errorf("campaignID can not be 0")
	}
	mapOpt := map[string]interface{}{}
	if opt == nil {
		mapOpt["selector"] = opt
	}
	req, err := s.client.NewRequest("POST", fmt.Sprintf("campaigns/%d/adgroupcreativesets/find", campaignID), mapOpt)
	if err != nil {
		return nil, nil, err
	}
	CreativeSets := []*CreativeSet{}
	resp, err := s.client.Do(ctx, req, &CreativeSets)
	if err != nil {
		return nil, resp, err
	}
	return CreativeSets, resp, nil
}
func ( s * CreativeSetService ) List ( ctx context . Context , campaignID int64 , opt * Selector ) ( [ ] * CreativeSet , * Response , error ) { if campaignID == 0 { return nil , nil , fmt . Errorf ( " " ) } mapOpt := map [ string ] interface { } { } if opt == nil { mapOpt [ " " ] = opt } req , err := s . client . NewRequest ( " " , fmt . Sprintf ( " " , campaignID ) , mapOpt ) if err != nil { return nil , nil , err } CreativeSets := [ ] * CreativeSet { } resp , err := s . client . Do ( ctx , req , & CreativeSets ) if err != nil { return nil , resp , err } return CreativeSets , resp , nil }
Fetches all Creative Sets assigned to ad groups.
Fetches all Creative Sets assigned to ad groups .