func (self *campaignService) Mutate(v CampaignMutateOperations) error { // v.BiddingStrategy.Cm = "https://adwords.google.com/api/adwords/cm/" + self.conn.Version // v.BiddingStrategy.Xsi = "http://www.w3.org/2001/XMLSchema-instance" // v := servicedAccountServiceGet{EnablePaging:false, SubmanagersOnly:false} returnBody, err := adx.CallApi(v, (*adx.Conn)(self), "CampaignService", "mutate") if err != nil { return err } defer returnBody.Close() // io.Copy(os.Stdout, res.Body) // uncomment this to view http response. Found a 414 once return nil }
func (self *campaignService) Get(v CampaignGetSelector) (*CampaignGet, error) { campaignGet := new(CampaignGet) returnBody, err := adx.CallApi(v, (*adx.Conn)(self), "CampaignService", "get") if err != nil { return nil, err } defer returnBody.Close() decoder := xml.NewDecoder(returnBody) err = decoder.Decode(campaignGet) if err != nil { return nil, err } if campaignGet.Fault.FaultString != "" { return nil, errors.New(campaignGet.Fault.FaultString) } // io.Copy(os.Stdout, returnBody) // uncomment this to view http response. Found a 414 once return campaignGet, nil }
func (self *constantDataService) GetVerticalCriterion() (*ConstantDataGetVerticalCriterion, error) { dataGet := new(ConstantDataGetVerticalCriterion) returnBody, err := adx.CallApi(nil, (*adx.Conn)(self), "ConstantDataService", "getVerticalCriterion") if err != nil { return nil, err } defer returnBody.Close() // io.Copy(os.Stdout, returnBody) decoder := xml.NewDecoder(returnBody) err = decoder.Decode(dataGet) if err != nil { return nil, err } if dataGet.Body.Fault.FaultString != "" { return nil, errors.New(dataGet.Body.Fault.FaultString) } // fmt.Printf("\nadgroupGet from AdgroupService %+v\n", dataGet) return dataGet, nil }
func (self *userListService) Get(v UserListSelector) (*UserListGet, error) { dataGet := new(UserListGet) returnBody, err := adx.CallApi(v, (*adx.Conn)(self), "UserListService", "get") if err != nil { return nil, err } defer returnBody.Close() // io.Copy(os.Stdout, returnBody) decoder := xml.NewDecoder(returnBody) err = decoder.Decode(dataGet) if err != nil { return nil, err } if dataGet.Body.Fault.FaultString != "" { return nil, errors.New(dataGet.Body.Fault.FaultString) } // fmt.Printf("\nadgroupGet from AdgroupService %+v\n", dataGet) return dataGet, nil }