Learn R Programming

ryandexdirect (version 3.6.2)

yadirGetCampaign: Get Campaigns List

Description

Returns the parameters of campaigns that meet the specified criteria.

Usage

yadirGetCampaignList(Logins = getOption("ryandexdirect.user"), 
                   States = c("OFF", "ON", "SUSPENDED",
                   "ENDED", "CONVERTED", "ARCHIVED"), Types =
                   c("TEXT_CAMPAIGN", "MOBILE_APP_CAMPAIGN",
                   "DYNAMIC_TEXT_CAMPAIGN", "CPM_BANNER_CAMPAIGN"),
                   Statuses = c("ACCEPTED", "DRAFT", "MODERATION",
                   "REJECTED"), StatusesPayment = c("DISALLOWED",
                   "ALLOWED"), Token = NULL, 
                   AgencyAccount = getOption("ryandexdirect.agency_account"),
                   TokenPath = yadirTokenPath())
				   
yadirGetCampaign(Logins = getOption("ryandexdirect.user"), 
                  States = c("OFF", "ON", "SUSPENDED",
                   "ENDED", "CONVERTED", "ARCHIVED"), Types =
                   c("TEXT_CAMPAIGN", "MOBILE_APP_CAMPAIGN", "DYNAMIC_TEXT_CAMPAIGN", 
                   "CPM_BANNER_CAMPAIGN", "SMART_CAMPAIGN"),
                   Statuses = c("ACCEPTED", "DRAFT", "MODERATION",
                   "REJECTED"), StatusesPayment = c("DISALLOWED",
                   "ALLOWED"), Token = NULL, 
                   AgencyAccount = getOption("ryandexdirect.agency_account"),
                   TokenPath = yadirTokenPath())

Value

data frame with campaings names and parameters

Arguments

Logins

Your Yandex Login

AgencyAccount

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

TokenPath

Path to directory where you save credential data

Token

character or list object, your Yandex API Token, you can get this by function yadirGetToken or yadirAuth

States

character vector, filter by campaign states, for example c("OFF", "ON", "SUSPENDED", "ENDED", "CONVERTED", "ARCHIVED")

Types

character vector with campaign types, example c("TEXT_CAMPAIGN", "MOBILE_APP_CAMPAIGN", "DYNAMIC_TEXT_CAMPAIGN")

Statuses

character vector, filter campaign list by status, for example c("ACCEPTED", "DRAFT", "MODERATION", "REJECTED")

StatusesPayment

character vector, filter campaign list by payment status, for example c("DISALLOWED", "ALLOWED")

Author

Alexey Seleznev

Examples

Run this code
if (FALSE) {
### Please choose another TokenPath to save the Login permanently.
#Get data from client accounts
my_ad_group <- yadirGetCampaign(Login = "login",
                                TokenPath = tempdir())

#Get data from agency account
# Auth
aut <- yadirAuth(Login = "agency_login", 
                 NewUser = TRUE, 
				 TokenPath = tempdir())

# Load Ad Group List
my_ad_group <- yadirGetCampaign(Login = "client_login",
                                Token = aut,
								TokenPath     = tempdir())
}

Run the code above in your browser using DataLab