// Create will create a new AdGroup on a specific campaign
Create will create a new AdGroup on a specific campaign
// Create will create a new AdGroup on a specific campaign
func (s *AdGroupService) Create(ctx context.Context, campaignID int64, data *AdGroup) (*AdGroup, *Response, error) {
	if campaignID == 0 {
		return nil, nil, fmt.Errorf("campaignID can not be 0")
	}
	u := fmt.Sprintf("campaigns/%d/adgroups", campaignID)
	req, err := s.client.NewRequest("POST", u, data)
	if err != nil {
		return nil, nil, err
	}
	adG := new(AdGroup)
	resp, err := s.client.Do(ctx, req, adG)
	if err != nil {
		return nil, resp, err
	}
	return adG, resp, nil
}
func ( s * AdGroupService ) Create ( ctx context . Context , campaignID int64 , data * AdGroup ) ( * AdGroup , * Response , error ) { if campaignID == 0 { return nil , nil , fmt . Errorf ( " " ) } u := fmt . Sprintf ( " " , campaignID ) req , err := s . client . NewRequest ( " " , u , data ) if err != nil { return nil , nil , err } adG := new ( AdGroup ) resp , err := s . client . Do ( ctx , req , adG ) if err != nil { return nil , resp , err } return adG , resp , nil }
Create will create a new AdGroup on a specific campaign
Create will create a new AdGroup on a specific campaign