SDITools / adobeanalyticsr

R Client for Adobe Analytics API v2.0
Other
18 stars 9 forks source link

`aw_get_segments`: allow a vector of tag names #109

Closed charlie-gallagher closed 2 years ago

charlie-gallagher commented 2 years ago

The current behavior: you must pass a comma-separated string to request more than one tag (undocumented).

aw_get_segments(tagNames = "tag1,tag2")

Proposed behavior: Allow a vector of tag names and process them inside the function. We can also continue to check for any comma within the tagNames argument for backwards compatibility.

aw_get_segments(tagNames = c("tag1", "tag2")

# Include within the function
if (!grepl(",", tagNames)) {
    tagNames <- paste(tagNames, collapse = ",")
}

I haven't looked at the source, I think that'll cover it though

charlie-gallagher commented 2 years ago

This was a mistake 🤦 but there is a warning when length(tagNames) > 1 that we should get rid of