R/getTags.R

getTags <-
  function(token = NULL,userId = NULL){
  tags <- content(POST("https://dataapi.uiscom.ru/v2.0",
                     body = toJSON(
                       list(
                         jsonrpc="2.0",
                         id=sample(100000:999999, 1, replace=TRUE),
                         method="get.tags",
                         params= list(
                           access_token=token,
                           user_id=userId)
                       )
                     )),"parsed", "application/json")

tagComagic <- do.call(rbind.data.frame, tags$result$data)
tagComagic$name <- as.character(tagComagic$name)
return(tagComagic)
}
nexter83/rComagic documentation built on May 12, 2019, 6:24 p.m.