// Get function to get specific AdGroup by id and campaignID
Get function to get specific AdGroup by id and campaignID
// Get function to get specific AdGroup by id and campaignID
func (s *AdGroupService) Get(ctx context.Context, campaignID, id int64) (*AdGroup, *Response, error) {
	if campaignID == 0 {
		return nil, nil, fmt.Errorf("campaignID can not be 0")
	}
	u := fmt.Sprintf("campaigns/%d/adgroups/%d", campaignID, id)
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}
	adGroup := new(AdGroup)
	resp, err := s.client.Do(ctx, req, adGroup)
	if err != nil {
		return nil, resp, err
	}
	return adGroup, resp, nil
}
func ( s * AdGroupService ) Get ( ctx context . Context , campaignID , id int64 ) ( * AdGroup , * Response , error ) { if campaignID == 0 { return nil , nil , fmt . Errorf ( " " ) } u := fmt . Sprintf ( " " , campaignID , id ) req , err := s . client . NewRequest ( " " , u , nil ) if err != nil { return nil , nil , err } adGroup := new ( AdGroup ) resp , err := s . client . Do ( ctx , req , adGroup ) if err != nil { return nil , resp , err } return adGroup , resp , nil }
Get function to get specific AdGroup by id and campaignID
Get function to get specific AdGroup by id and campaignID