/// <summary> /// Returns the list of AdGroupFeeds that match the query. /// /// @param query The SQL-like AWQL query string. /// @returns A list of AdGroupFeed. /// @throws ApiException if problems occur while parsing the query or fetching AdGroupFeed. /// </summary> public async Task <AdGroupFeedPage> QueryAsync(string query) { var binding = new AdGroupFeedServiceSoapBinding("https://adwords.google.com/api/adwords/cm/v201609/AdGroupFeedService", _config.AccessToken, _config.Timeout, _config.EnableGzipCompression, _netUtil, _logger); var inData = new SoapData <AdGroupFeedServiceRequestHeader, AdGroupFeedServiceQuery>(); inData.Header = new AdGroupFeedServiceRequestHeader(); AssignHeaderValues(inData.Header); inData.Body = new AdGroupFeedServiceQuery(); inData.Body.Query = query; var outData = await binding.QueryAsync(inData).ConfigureAwait(false); return(outData.Body.Rval); }
/// <summary> /// Adds, updates or removes AdGroupFeeds. /// /// @param operations The operations to apply. /// @return The resulting Feeds. /// @throws ApiException Indicates a problem with the request. /// </summary> public async Task <AdGroupFeedReturnValue> MutateAsync(IEnumerable <AdGroupFeedOperation> operations) { var binding = new AdGroupFeedServiceSoapBinding("https://adwords.google.com/api/adwords/cm/v201609/AdGroupFeedService", _config.AccessToken, _config.Timeout, _config.EnableGzipCompression, _netUtil, _logger); var inData = new SoapData <AdGroupFeedServiceRequestHeader, AdGroupFeedServiceMutate>(); inData.Header = new AdGroupFeedServiceRequestHeader(); AssignHeaderValues(inData.Header); inData.Body = new AdGroupFeedServiceMutate(); inData.Body.Operations = new List <AdGroupFeedOperation>(operations); var outData = await binding.MutateAsync(inData).ConfigureAwait(false); return(outData.Body.Rval); }