The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

# rmytarget - R пакет для работы с API MyTarget v2

Подробная русскоязычная документация находится по ссылке.

Виньетки

Помимо основной документации пакет содержит 2 виньетки:

Для просмотра виньеток запустите в R одну из следующих команд:

vignette('rmytarget-auth', package = 'rmytarget')

vignette('rmytarget-intro', package = 'rmytarget')

Поддержать проект

Вы можете поддержать проект любой произвольной суммой перейдя по этой ссылке.

Функции пакета rmytarget

На данный момент в пакете rmytarget доступно 5 функций:

Пример работы с пакетом rmytarget

# work with simple client account
# authorize by ad account
myTarAuth(login = "client_login")

# get campaing list
campaing <- myTarGetCampaignList(login = "client_login")

# get ads list
ads      <- myTarGetAdList(login = "client_login")

# load statistic
# load base stat by ads
old_data    <- myTarGetStats(date_from   = Sys.Date() - 7,
                             date_to     = Sys.Date(),
                             object_type = "banners",
                             object_id   = campaing$id,
                             login       = "client_login")

# load base, tps, and viral metrics by campaings
custom_data <- myTarGetStats(date_from   = Sys.Date() - 7,
                             date_to     = Sys.Date(),
                             object_type = "campaigns",
                             metrics     = c("base", "tps", "viral"),
                             stat_type   = "day",
                             login       = "client_login")

# load all metrics by campaigns
all_data <- myTarGetStats(date_from   = Sys.Date() - 7,
                          date_to     = Sys.Date(),
                          object_type = "campaigns",
                          metrics     = "all",
                          login       = "client_login")

# ========================
# work with agency account
# authorize by agency account
myTarAuth(login = "agency_login")

# load client list from agency account 
clients <- myTarGetClientList(login = "agency_login")

# load statistic by agency clients
client_stat <-  myTarGetStats(date_from   = Sys.Date() - 7,
                              date_to     = Sys.Date(),
                              object_id   = clients$id,
                              object_type = "users",
                              metrics     = "all",
                              login       = "agency_login")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.