Learn R Programming

adwordsR (version 0.3.1)

buildXmlEnvelope: Build XML Envelope

Description

Build the XML Envelope that contains the Header and Body needed for the SOAP request.

Usage

buildXmlEnvelope(myMcc, userAgent, developerToken, adwordsService,
  ManagedCustomerService_Selector_fields = NULL,
  categoryProductsAndServices = NULL, competition = NULL,
  ideaTextFilter_included = NULL, ideaTextFilter_excluded = NULL,
  includeAdultContent = NULL, language = NULL, location = NULL,
  network_GoogleSearch = NULL, network_SearchNetwork = NULL,
  relatedToQuery = NULL, relatedToUrl = NULL, searchVolumeMinimum = NULL,
  searchVolumeMaximum = NULL, seedAdGroupId = NULL, requestType = NULL,
  attributeTypes = NULL, pagingStartIndex = NULL,
  pagingNumberResults = NULL, apiVersion = NULL)

Arguments

myMcc

The Manager Account (MCC) needed to access the Adwords API

userAgent

The user agent required for the header of the XML request

developerToken

The developerToken required for accessing the API. Found in the API settings of the Adwords Account.

adwordsService

The chosen Adwords Service for the request

ManagedCustomerService_Selector_fields

The requested fields from the ManagedCustomerService, such as CustomerId.

categoryProductsAndServices

A keyword category ID (Integer) in the "Products and Services" taxonomy that all search results should belong to.

competition

Vector of Levels of competition that should be included in the results

ideaTextFilter_included

The vector of strings that should be included

ideaTextFilter_excluded

The vector of strings that should be excluded

includeAdultContent

TRUE or FALSE option for including the targeting of Adult Content.

language

The Language (or Criterion ID) that all results should be targeted against.

location

The Location (or Criterion ID) that all results should be targeted against.

network_GoogleSearch

Whether search should be targeting Google Search

network_SearchNetwork

Whether search should be targeting the Google Search Network (AFS)

relatedToQuery

The vector of queries to post to the API as a Search Parameter.

relatedToUrl

The vector of URLs to post to the API, which results will be related to.

searchVolumeMinimum

The minimum Search Volume that should be targeted.

searchVolumeMaximum

The maximum Search Volume that should be targeted.

seedAdGroupId

The Adgroup ID that should be used as a seed for generating new ideas.

requestType

Represents the type of the request.

attributeTypes

Vector of Attributes Types.

pagingStartIndex

Index of the first result to return. (Optional)

pagingNumberResults

Maximum number of results to return. This figure is limited to 700. (Optional)

apiVersion

Version of the API being used.

Value

Returns the fully built XML text ready for sending to the API.

Details

The only required parameters are as follows: myMcc, userAgent, developerToken, adwordsService.

Examples

Run this code
# NOT RUN {
buildXmlEnvelope(myMcc = "123-456-7890", 
                 userAgent = "myUserAgent", 
                 developerToken = "myD3v3l0p3r70k3n",
                 adwordsService = "ManagedCustomerService", 
                 ManagedCustomerService_Selector_fields = c("Name", "CustomerId"),
                 apiVersion = "v201806")
# }

Run the code above in your browser using DataLab