diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..92ed04c --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 0.11.0 +Date: 2024-05-14 11:03:19 UTC +SHA: 7d4b17ca5b19aa185fc945dd91945b43bb62c90c diff --git a/DESCRIPTION b/DESCRIPTION index 28ae3bf..d05e583 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rgoogleads Title: Loading Data from 'Google Ads API' -Version: 0.10.0.9000 +Version: 0.11.0 Authors@R: c(person(given = "Alexey", family = "Seleznev", @@ -16,27 +16,29 @@ License: MIT + file LICENSE BugReports: https://github.com/selesnow/rgoogleads/issues URL: https://selesnow.github.io/rgoogleads/, https://selesnow.github.io/rgoogleads/docs/, https://github.com/selesnow/rgoogleads Encoding: UTF-8 -Imports: gargle (>= 1.2.0), - httr, - stringr, - rlang, - dplyr (>= 1.0.0), - tidyr (>= 1.0.0), - jsonlite, - snakecase, - cli (>= 3.0.0), - pbapply, - purrr, - withr, - rlist, - rvest (>= 1.0.0), - memoise, - cachem, - rappdirs, - utils +Imports: + gargle (>= 1.2.0), + httr, + stringr, + rlang, + dplyr (>= 1.0.0), + tidyr (>= 1.0.0), + jsonlite, + snakecase, + cli (>= 3.0.0), + pbapply, + purrr, + withr, + rlist, + rvest (>= 1.0.0), + memoise, + cachem, + rappdirs, + utils, + lifecycle LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.1 +RoxygenNote: 7.2.3 Suggests: rmarkdown, knitr, diff --git a/NEWS.md b/NEWS.md index a4c9562..acaba43 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,5 @@ -# rgoogleads (development version) +# rgoogleads 0.11.0 +* Пакет переведён на работу с Google Ads API v16. # rgoogleads 0.10.0 * Пакет переведён на работу с Google Ads API v14. diff --git a/R/gads_auth.R b/R/gads_auth.R index da56e34..9c158f8 100644 --- a/R/gads_auth.R +++ b/R/gads_auth.R @@ -3,6 +3,7 @@ # initialization happens in .onLoad .auth <- NULL +app <- NULL ## The roxygen comments for these functions are mostly generated from data ## in this list and template text maintained in gargle. @@ -189,20 +190,26 @@ gads_has_token <- function() { #' gs4_auth_configure(app = original_app, api_key = original_api_key) #' } #' @export -gads_auth_configure <- function(app, path, api_key, developer_token) { - if (!missing(app) && !missing(path)) { - gads_abort("Must supply exactly one of {.arg app} or {.arg path}, not both") +gads_auth_configure <- function(client, path, api_key, developer_token, app = lifecycle::deprecated()) { + + if (lifecycle::is_present(app)) { + gads_auth_configure(client = app, path = path, api_key = api_key) + } + + if (!missing(client) && !missing(path)) { + gads_abort("Must supply exactly one of {.arg client} or {.arg path}, not both") } + stopifnot(missing(api_key) || is.null(api_key) || is_string(api_key)) if (!missing(path)) { stopifnot(is_string(path)) - app <- gargle::oauth_app_from_json(path) + client <- gargle::oauth_app_from_json(path) } - stopifnot(missing(app) || is.null(app) || inherits(app, "oauth_app")) + stopifnot(missing(client) || is.null(client) || inherits(client, "oauth_app")) - if (!missing(app) || !missing(path)) { - .auth$set_app(app) + if (!missing(client) || !missing(path)) { + .auth$set_app(client) } if (!missing(api_key)) { diff --git a/R/gads_get_accessible_customers.R b/R/gads_get_accessible_customers.R index ceedd2a..13d7982 100644 --- a/R/gads_get_accessible_customers.R +++ b/R/gads_get_accessible_customers.R @@ -3,7 +3,7 @@ #' @return List of your accessible accounts from top level #' @export #' -#' @seealso \href{https://developers.google.com/google-ads/api/rest/reference/rest/v13/customers/listAccessibleCustomers}{Method: customers.listAccessibleCustomers documentation} +#' @seealso \href{https://developers.google.com/google-ads/api/rest/reference/rest/v16/customers/listAccessibleCustomers}{Method: customers.listAccessibleCustomers documentation} #' #' @examples #' \dontrun{ diff --git a/R/gads_get_ad_group_criterions.R b/R/gads_get_ad_group_criterions.R index 44541d4..0c7e52d 100644 --- a/R/gads_get_ad_group_criterions.R +++ b/R/gads_get_ad_group_criterions.R @@ -60,8 +60,6 @@ gads_get_ad_group_criterions <- function( 'ad_group_criterion.listing_group.case_value.hotel_class.value', 'ad_group_criterion.listing_group.case_value.hotel_id.value', 'ad_group_criterion.listing_group.case_value.hotel_state.state_criterion', - 'ad_group_criterion.listing_group.case_value.product_bidding_category.id', - 'ad_group_criterion.listing_group.case_value.product_bidding_category.level', 'ad_group_criterion.listing_group.case_value.product_brand.value', 'ad_group_criterion.listing_group.case_value.product_channel.channel', 'ad_group_criterion.listing_group.case_value.product_condition.condition', diff --git a/R/gads_get_ads.R b/R/gads_get_ads.R index 5eba8f7..65055f3 100644 --- a/R/gads_get_ads.R +++ b/R/gads_get_ads.R @@ -64,18 +64,6 @@ gads_get_ads <- function( 'ad_group_ad.ad.final_url_suffix', 'ad_group_ad.ad.final_urls', 'ad_group_ad.ad.final_mobile_urls', - 'ad_group_ad.ad.gmail_ad.header_image', - 'ad_group_ad.ad.gmail_ad.marketing_image', - 'ad_group_ad.ad.gmail_ad.marketing_image_description', - 'ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text', - 'ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text_color', - 'ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.url_collection_id', - 'ad_group_ad.ad.gmail_ad.marketing_image_headline', - 'ad_group_ad.ad.gmail_ad.product_images', - 'ad_group_ad.ad.gmail_ad.teaser.business_name', - 'ad_group_ad.ad.gmail_ad.teaser.description', - 'ad_group_ad.ad.gmail_ad.teaser.headline', - 'ad_group_ad.ad.gmail_ad.teaser.logo_image', 'ad_group_ad.ad.hotel_ad', 'ad_group_ad.ad.image_ad.image_url', 'ad_group_ad.ad.image_ad.mime_type', diff --git a/R/gads_get_campaigns.R b/R/gads_get_campaigns.R index f3d2f5a..d65a675 100644 --- a/R/gads_get_campaigns.R +++ b/R/gads_get_campaigns.R @@ -53,7 +53,6 @@ gads_get_campaigns <- function( 'campaign.payment_mode', 'campaign.serving_status', 'campaign.shopping_setting.campaign_priority', - 'campaign.shopping_setting.sales_country', 'campaign.target_roas.target_roas', 'campaign.tracking_url_template', 'customer.descriptive_name', diff --git a/R/gads_utils.R b/R/gads_utils.R index 366230f..45cd3f1 100644 --- a/R/gads_utils.R +++ b/R/gads_utils.R @@ -119,7 +119,13 @@ gads_make_request <- function( # -------------- # get answer if (verbose) cli_alert_info('Get answer query') - out <- response_process(ans, error_message = gads_check_errors2) + tryCatch( + {out <- response_process(ans, error_message = gads_check_errors2)}, + error = function(e) { + gads_check_errors2(ans) + stop() + } + ) # requests_ids if ( !is.null(ans$headers$`request-id`) ) { diff --git a/R/zzz.R b/R/zzz.R index 20a0b99..944ece8 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -59,7 +59,7 @@ # options op <- options() op.gads <- list(gads.developer.token = developer_token, - gads.api.version = "v15", + gads.api.version = "v16", gads.login.customer.id = login_customer_id, gads.customer.id = customer_id, gads.multi.account.verbos = FALSE, diff --git a/cran-comments.md b/cran-comments.md index a20073b..75ff951 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ ## R CMD check results -0 errors | 0 warnings | 0 note +0 errors | 0 warnings | 1 note -* Change Google Ads API versions. +* Migrate to Google Ads API v.16. diff --git a/man/gads_auth.Rd b/man/gads_auth.Rd index fd548d0..937c041 100644 --- a/man/gads_auth.Rd +++ b/man/gads_auth.Rd @@ -40,40 +40,47 @@ credentials are cached in a folder below your home directory, from where they can be automatically refreshed, as necessary. Storage at the user level means the same token can be used across multiple projects and tokens are less likely to be synced to the cloud by accident. - -If you are interacting with R within a browser (applies to RStudio Server, -RStudio Workbench, and RStudio Cloud), you need a variant of this flow, -known as out-of-band auth ("oob"). If this does not happen -automatically, you can request it yourself with \code{use_oob = TRUE} or, -more persistently, by setting an option via -\code{options(gargle_oob_default = TRUE)}. } \details{ Most users, most of the time, do not need to call \code{gads_auth()} explicitly -- it is triggered by the first action that requires authorization. Even when called, the default arguments often suffice. -However, when necessary, this function allows the user to explicitly: + +However, when necessary, \code{gads_auth()} allows the user to explicitly: \itemize{ -\item Declare which Google identity to use, via an email address. If there -are multiple cached tokens, this can clarify which one to use. It can -also force rgoogleads to switch from one identity to another. If -there's no cached token for the email, this triggers a return to the -browser to choose the identity and give consent. You can specify just -the domain by using a glob pattern. This means that a script -containing \code{email = "*@example.com"} can be run without further -tweaks on the machine of either \code{alice@example.com} or -\code{bob@example.com}. -\item Use a service account token or workload identity federation. -\item Bring their own \link[httr:Token-class]{Token2.0}. -\item Specify non-default behavior re: token caching and out-of-bound -authentication. -\item Customize scopes. +\item Declare which Google identity to use, via an \code{email} specification. +\item Use a service account token or workload identity federation via +\code{path}. +\item Bring your own \code{token}. +\item Customize \code{scopes}. +\item Use a non-default \code{cache} folder or turn caching off. +\item Explicitly request out-of-band (OOB) auth via \code{use_oob}. } +If you are interacting with R within a browser (applies to RStudio +Server, Posit Workbench, Posit Cloud, and Google Colaboratory), you need +OOB auth or the pseudo-OOB variant. If this does not happen +automatically, you can request it explicitly with \code{use_oob = TRUE} or, +more persistently, by setting an option via +\code{options(gargle_oob_default = TRUE)}. + +The choice between conventional OOB or pseudo-OOB auth is determined +by the type of OAuth client. If the client is of the "installed" type, +\code{use_oob = TRUE} results in conventional OOB auth. If the client is of +the "web" type, \code{use_oob = TRUE} results in pseudo-OOB auth. Packages +that provide a built-in OAuth client can usually detect which type of +client to use. But if you need to set this explicitly, use the +\code{"gargle_oauth_client_type"} option: + +\if{html}{\out{
}}\preformatted{options(gargle_oauth_client_type = "web") # pseudo-OOB +# or, alternatively +options(gargle_oauth_client_type = "installed") # conventional OOB +}\if{html}{\out{
}} + For details on the many ways to find a token, see \code{\link[gargle:token_fetch]{gargle::token_fetch()}}. For deeper control over auth, use -\code{\link[=gads_auth_configure]{gads_auth_configure()}} to bring your own OAuth app or API key. -Read more about gargle options, see \link[gargle:gargle_options]{gargle::gargle_options}. +\code{\link[=gads_auth_configure]{gads_auth_configure()}} to bring your own OAuth client or API key. +To learn more about gargle options, see \link[gargle:gargle_options]{gargle::gargle_options}. } \examples{ \dontrun{ diff --git a/man/gads_auth_configure.Rd b/man/gads_auth_configure.Rd index 9007b46..387298b 100644 --- a/man/gads_auth_configure.Rd +++ b/man/gads_auth_configure.Rd @@ -9,7 +9,13 @@ \alias{gads_oauth_app} \title{Edit and view auth configuration} \usage{ -gads_auth_configure(app, path, api_key, developer_token) +gads_auth_configure( + client, + path, + api_key, + developer_token, + app = lifecycle::deprecated() +) gads_auth_cache_path() @@ -22,22 +28,26 @@ gads_developer_token() gads_oauth_app() } \arguments{ -\item{app}{OAuth app, in the sense of \code{\link[httr:oauth_app]{httr::oauth_app()}}.} +\item{client}{A Google OAuth client, presumably constructed via +\code{\link[gargle:gargle_oauth_client_from_json]{gargle::gargle_oauth_client_from_json()}}. Note, however, that it is +preferred to specify the client with JSON, using the \code{path} argument.} -\item{path}{JSON downloaded from Google Cloud Platform Console, containing a -client id (aka key) and secret, in one of the forms supported for the \code{txt} -argument of \code{\link[jsonlite:fromJSON]{jsonlite::fromJSON()}} (typically, a file path or JSON string).} +\item{path}{JSON downloaded from \href{https://console.cloud.google.com}{Google Cloud Console}, containing a client id and +secret, in one of the forms supported for the \code{txt} argument of +\code{\link[jsonlite:fromJSON]{jsonlite::fromJSON()}} (typically, a file path or JSON string).} \item{api_key}{API key.} \item{developer_token}{Your Google Ads Developer Token.} + +\item{app}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Replaced by the \code{client} +argument.} } \value{ \itemize{ \item \code{gads_auth_configure()}: An object of R6 class \link[gargle:AuthState-class]{gargle::AuthState}, invisibly. -\item \code{gads_oauth_app()}: the current user-configured -\code{\link[httr:oauth_app]{httr::oauth_app()}}. +\item \code{gads_oauth_client()}: the current user-configured OAuth client. \item \code{gads_api_key()}: the current user-configured API key. } } @@ -46,17 +56,18 @@ These functions give more control over and visibility into the auth configuration than \code{\link[=gads_auth]{gads_auth()}} does. \code{gads_auth_configure()} lets the user specify their own: \itemize{ -\item OAuth app, which is used when obtaining a user token. +\item OAuth client, which is used when obtaining a user token. \item API key. If rgoogleads is de-authorized via \code{\link[=gads_deauth]{gads_deauth()}}, all requests are sent with an API key in lieu of a token. -See the vignette -\href{https://gargle.r-lib.org/articles/get-api-credentials.html}{How to get your own API credentials} +} + +See the \code{vignette("get-api-credentials", package = "gargle")} for more. If the user does not configure these settings, internal defaults are used. -\code{gads_oauth_app()} and \code{gads_api_key()} retrieve the -currently configured OAuth app and API key, respectively. -} + +\code{gads_oauth_client()} and \code{gads_api_key()} retrieve the +currently configured OAuth client and API key, respectively. } \examples{ \dontrun{ diff --git a/man/gads_get_accessible_customers.Rd b/man/gads_get_accessible_customers.Rd index 0adc7a0..79e37e4 100644 --- a/man/gads_get_accessible_customers.Rd +++ b/man/gads_get_accessible_customers.Rd @@ -18,5 +18,5 @@ accounts <- gads_get_accessible_customers() } } \seealso{ -\href{https://developers.google.com/google-ads/api/rest/reference/rest/v13/customers/listAccessibleCustomers}{Method: customers.listAccessibleCustomers documentation} +\href{https://developers.google.com/google-ads/api/rest/reference/rest/v16/customers/listAccessibleCustomers}{Method: customers.listAccessibleCustomers documentation} } diff --git a/man/gads_get_ad_group_criterions.Rd b/man/gads_get_ad_group_criterions.Rd index d23664b..bae54ce 100644 --- a/man/gads_get_ad_group_criterions.Rd +++ b/man/gads_get_ad_group_criterions.Rd @@ -36,43 +36,43 @@ gads_get_ad_group_criterions( "ad_group_criterion.listing_group.case_value.hotel_id.value", "ad_group_criterion.listing_group.case_value.hotel_state.state_criterion", - "ad_group_criterion.listing_group.case_value.product_bidding_category.id", - "ad_group_criterion.listing_group.case_value.product_bidding_category.level", "ad_group_criterion.listing_group.case_value.product_brand.value", "ad_group_criterion.listing_group.case_value.product_channel.channel", "ad_group_criterion.listing_group.case_value.product_condition.condition", - "ad_group_criterion.listing_group.case_value.product_custom_attribute.index", - + "ad_group_criterion.listing_group.case_value.product_custom_attribute.index", "ad_group_criterion.listing_group.case_value.product_custom_attribute.value", - "ad_group_criterion.listing_group.case_value.product_type.level", + "ad_group_criterion.listing_group.case_value.product_type.level", + "ad_group_criterion.listing_group.case_value.product_item_id.value", "ad_group_criterion.listing_group.case_value.product_type.value", "ad_group_criterion.listing_group.parent_ad_group_criterion", "ad_group_criterion.listing_group.type", "ad_group_criterion.mobile_app_category.mobile_app_category_constant", - "ad_group_criterion.mobile_application.app_id", - + "ad_group_criterion.mobile_application.app_id", "ad_group_criterion.mobile_application.name", "ad_group_criterion.negative", "ad_group_criterion.parental_status.type", - "ad_group_criterion.percent_cpc_bid_micros", "ad_group_criterion.placement.url", + "ad_group_criterion.percent_cpc_bid_micros", + + "ad_group_criterion.placement.url", "ad_group_criterion.position_estimates.estimated_add_cost_at_first_position_cpc", "ad_group_criterion.position_estimates.estimated_add_clicks_at_first_position_cpc", "ad_group_criterion.position_estimates.first_page_cpc_micros", - "ad_group_criterion.position_estimates.first_position_cpc_micros", - + "ad_group_criterion.position_estimates.first_position_cpc_micros", "ad_group_criterion.position_estimates.top_of_page_cpc_micros", "ad_group_criterion.quality_info.creative_quality_score", - "ad_group_criterion.quality_info.post_click_quality_score", + "ad_group_criterion.quality_info.post_click_quality_score", + "ad_group_criterion.quality_info.quality_score", "ad_group_criterion.quality_info.search_predicted_ctr", "ad_group_criterion.resource_name", "ad_group_criterion.status", "ad_group_criterion.system_serving_status", "ad_group_criterion.topic.path", "ad_group_criterion.topic.topic_constant", - "ad_group_criterion.tracking_url_template", - "ad_group_criterion.type", + "ad_group_criterion.tracking_url_template", "ad_group_criterion.type", "ad_group_criterion.url_custom_parameters", "ad_group_criterion.user_interest.user_interest_category", - "ad_group_criterion.user_list.user_list", "ad_group_criterion.webpage.conditions", + "ad_group_criterion.user_list.user_list", + + "ad_group_criterion.webpage.conditions", "ad_group_criterion.webpage.coverage_percentage", "ad_group_criterion.webpage.criterion_name", "ad_group_criterion.webpage.sample.sample_urls", diff --git a/man/gads_get_ads.Rd b/man/gads_get_ads.Rd index e2ee832..500b575 100644 --- a/man/gads_get_ads.Rd +++ b/man/gads_get_ads.Rd @@ -34,55 +34,43 @@ gads_get_ads( "ad_group_ad.ad.expanded_text_ad.path1", "ad_group_ad.ad.expanded_text_ad.path2", "ad_group_ad.ad.final_url_suffix", "ad_group_ad.ad.final_urls", - "ad_group_ad.ad.final_mobile_urls", "ad_group_ad.ad.gmail_ad.header_image", - "ad_group_ad.ad.gmail_ad.marketing_image", - "ad_group_ad.ad.gmail_ad.marketing_image_description", - "ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text", - "ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text_color", - "ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.url_collection_id", - "ad_group_ad.ad.gmail_ad.marketing_image_headline", - "ad_group_ad.ad.gmail_ad.product_images", - - "ad_group_ad.ad.gmail_ad.teaser.business_name", - "ad_group_ad.ad.gmail_ad.teaser.description", - "ad_group_ad.ad.gmail_ad.teaser.headline", - "ad_group_ad.ad.gmail_ad.teaser.logo_image", "ad_group_ad.ad.hotel_ad", + "ad_group_ad.ad.final_mobile_urls", "ad_group_ad.ad.hotel_ad", "ad_group_ad.ad.image_ad.image_url", "ad_group_ad.ad.image_ad.mime_type", "ad_group_ad.ad.image_ad.name", "ad_group_ad.ad.image_ad.pixel_height", "ad_group_ad.ad.image_ad.pixel_width", "ad_group_ad.ad.image_ad.preview_image_url", "ad_group_ad.ad.image_ad.preview_pixel_height", - "ad_group_ad.ad.image_ad.preview_pixel_width", - + "ad_group_ad.ad.image_ad.preview_pixel_width", "ad_group_ad.ad.legacy_app_install_ad", - "ad_group_ad.ad.legacy_responsive_display_ad.accent_color", + "ad_group_ad.ad.legacy_responsive_display_ad.accent_color", + "ad_group_ad.ad.legacy_responsive_display_ad.allow_flexible_color", "ad_group_ad.ad.legacy_responsive_display_ad.business_name", "ad_group_ad.ad.legacy_responsive_display_ad.description", "ad_group_ad.ad.legacy_responsive_display_ad.call_to_action_text", "ad_group_ad.ad.legacy_responsive_display_ad.format_setting", "ad_group_ad.ad.legacy_responsive_display_ad.logo_image", - "ad_group_ad.ad.legacy_responsive_display_ad.long_headline", - + "ad_group_ad.ad.legacy_responsive_display_ad.long_headline", "ad_group_ad.ad.legacy_responsive_display_ad.main_color", - "ad_group_ad.ad.legacy_responsive_display_ad.marketing_image", + "ad_group_ad.ad.legacy_responsive_display_ad.marketing_image", + "ad_group_ad.ad.legacy_responsive_display_ad.price_prefix", "ad_group_ad.ad.legacy_responsive_display_ad.promo_text", "ad_group_ad.ad.legacy_responsive_display_ad.short_headline", "ad_group_ad.ad.legacy_responsive_display_ad.square_logo_image", "ad_group_ad.ad.legacy_responsive_display_ad.square_marketing_image", - "ad_group_ad.ad.local_ad.call_to_actions", "ad_group_ad.ad.local_ad.descriptions", - - "ad_group_ad.ad.local_ad.headlines", "ad_group_ad.ad.local_ad.logo_images", - "ad_group_ad.ad.local_ad.marketing_images", "ad_group_ad.ad.local_ad.path1", + "ad_group_ad.ad.local_ad.call_to_actions", "ad_group_ad.ad.local_ad.descriptions", + "ad_group_ad.ad.local_ad.headlines", "ad_group_ad.ad.local_ad.logo_images", + "ad_group_ad.ad.local_ad.marketing_images", + "ad_group_ad.ad.local_ad.path1", "ad_group_ad.ad.local_ad.path2", "ad_group_ad.ad.resource_name", "ad_group_ad.ad.responsive_display_ad.accent_color", "ad_group_ad.ad.responsive_display_ad.allow_flexible_color", "ad_group_ad.ad.responsive_display_ad.business_name", "ad_group_ad.ad.responsive_display_ad.call_to_action_text", - "ad_group_ad.ad.responsive_display_ad.control_spec.enable_asset_enhancements", - + "ad_group_ad.ad.responsive_display_ad.control_spec.enable_asset_enhancements", "ad_group_ad.ad.responsive_display_ad.control_spec.enable_autogen_video", - "ad_group_ad.ad.responsive_display_ad.format_setting", + "ad_group_ad.ad.responsive_display_ad.format_setting", + "ad_group_ad.ad.responsive_display_ad.headlines", "ad_group_ad.ad.responsive_display_ad.long_headline", "ad_group_ad.ad.responsive_display_ad.main_color", diff --git a/man/gads_get_campaigns.Rd b/man/gads_get_campaigns.Rd index b4a8ff7..57cce63 100644 --- a/man/gads_get_campaigns.Rd +++ b/man/gads_get_campaigns.Rd @@ -25,8 +25,8 @@ gads_get_campaigns( "campaign.optimization_score", "campaign.payment_mode", "campaign.serving_status", "campaign.shopping_setting.campaign_priority", - "campaign.shopping_setting.sales_country", "campaign.target_roas.target_roas", - "campaign.tracking_url_template", "customer.descriptive_name", "customer.id"), + "campaign.target_roas.target_roas", "campaign.tracking_url_template", + "customer.descriptive_name", "customer.id"), where = NULL, order_by = NULL, limit = NULL, diff --git a/test.R b/test.R index 4142cc8..b5b3c71 100644 --- a/test.R +++ b/test.R @@ -80,7 +80,7 @@ accounts <- gads_get_accessible_customers() gads_set_login_customer_id('1754107253') # установка клиентского логина -gads_set_customer_id('6766427440') +gads_set_customer_id('3449310772') # load account hierarchy -------------------------------------------------- @@ -214,7 +214,7 @@ myacs <- gads_get_accessible_customers() # campaigns --------------------------------------------------------------- mycamp <- gads_get_campaigns(customer_id = acs) cam <- gads_get_campaigns( - customer_id = acs[4], + customer_id = sample(client_acs, 70), where = "campaign.status = 'ENABLED'") @@ -283,10 +283,10 @@ resources[5,]$metrics %>% unlist gads_set_customer_id() gads_set_login_customer_id() -gads_get_campaigns() -gads_get_ad_groups() -gads_get_ads() -gads_get_ad_group_criterions() +camps <- gads_get_campaigns() +adgr <- gads_get_ad_groups(customer_id = 1507592784) +gads <- gads_get_ads(customer_id = 1507592784) +cri <- gads_get_ad_group_criterions(customer_id = 1507592784) library(rgoogleads)