Learn R Programming

ryandexdirect (version 3.6.2)

yadirGetAdGroups: Get AdGroups List

Description

Returns parameters of adgroups that meet specified criteria.

Usage

yadirGetAdGroups(CampaignIds   = NULL, 
                 Ids           = NA, 
                 Types         = c("TEXT_AD_GROUP", 
                                   "MOBILE_APP_AD_GROUP", 
                                   "DYNAMIC_TEXT_AD_GROUP",
                                   "CPM_BANNER_AD_GROUP", 
                                   "CPM_VIDEO_AD_GROUP",
                                   "SMART_AD_GROUP"),
                 Statuses      = c("ACCEPTED", 
				                   "DRAFT", 
			                       "MODERATION", 
								   "PREACCEPTED", 
								   "REJECTED"), 
                 Login         = getOption("ryandexdirect.user"),
                 AgencyAccount = getOption("ryandexdirect.agency_account"),
                 Token         = NULL,
                 TokenPath     = yadirTokenPath())

Value

data frame with adgroups names and parameters

Arguments

CampaignIds

character vector with yandex direct campaign ID, require

Ids

character vector with yandex direct adgroup ID

Types

character vector with adgroup types states

Statuses

character vector with adgroup types statuses

Login

character, your login at Yandex, require

Token

character, your Yandex Direct API Token, require

AgencyAccount

Your agency account login, if you get statistic from client account

TokenPath

Path to directory where you save credential data

Author

Alexey Seleznev

Examples

Run this code
if (FALSE) {
#For get adgroups data frame
# Get data from clients account
my_ad_group <- yadirGetAdGroups(Login = "login")

# Get data from agency account
### !!!Please choose another TokenPath to save the Login permanently.
my_ad_group <- yadirGetAdGroups(Login         = "client_login",
                                AgencyAccount = "agency_login",
								TokenPath     =  tempdir())

}

Run the code above in your browser using DataLab