account: Access account information

Description Usage Arguments Details Value Methods (by class) Caching account information Interactive use See Also Examples

View source: R/account_account.R

Description

Returns an account object, representing the account that you're performing actions on in brandseyer2.

Usage

1
2
3
4
5
6
7
account(codes, ...)

## S3 method for class 'character'
account(codes, ..., .show.progress = interactive(), .ignore.cache = FALSE)

## S3 method for class 'data.frame'
account(codes, ..., .show.progress = interactive())

Arguments

codes

A vector of one or more account codes, or possibly a tibble (with an account column, such as from account_list())

...

Additional account codes.

.show.progress

A logical indicating whether a progress bar should be shown or not. By default, it will only be shown on interactive sessions. Further, no matter this parameter's value, the bar will only be shown when fetching account information for more than five accounts.

.ignore.cache

Causes account() to always fetch account data from BrandsEye, even if the account cache has data stored.

Details

Typically you may ask for only a single account, by passing a single account code as an argument. You can also pass in multiple account codes, or even a vector of account codes, to be given a list of account objects to act on.

Value

An account object if one account code is given, or a list of account objects, one for each code given, in the same order as the codes were given.

Methods (by class)

Caching account information

Account information is by default cached for one minute per account. In other words, while the first call to account() to find information for a particular account will spend time on network comms, for the next ten minutes the same call to account() performs no network comms.

Please note that it may cause stale data to be returned. See the .ignore.cache parameter.

Interactive use

When reading multiple accounts at a time, this method will by defualt show a progress bar in interactive environments (such as RStudio). You can control this behaviour using the .show.progress parameter.

See Also

accounts() is a synonym for account.

is_account() to test if an object is an account object.

account_code() to get the account code.

account_client_code() to get the account client code.

tags() to find tags in an account.

topics() to find topics in an account.

create_tags() to add more tags to an account.

topic_trees() to find the topic trees in an account.

logs() to read the account's logs.

users() to see what users have access to the account.

rules() for the list of rules applied to mentions in the account.

profiles() for the list of online profiles for the account.

Examples

1
2
3
4
5
6
7
8
# Read one account
account("TEST01AA")

# Read two accounts
account("TEST01AA", "TEST02AA")

# Read accounts from a vector
account(c("TEST01AA", "TEST02AA"))

brandseye/brandseyer2 documentation built on Sept. 5, 2021, 2:15 p.m.