sm_add_instance: Add an instance of a federated social media

View source: R/config.R

sm_add_instanceR Documentation

Add an instance of a federated social media

Description

Adds a domain to the instances a federated social media family collects from. Each instance is collected as a network of its own, named <family>.<instance>, with its own plan file, its own search process and its own access token.

Usage

sm_add_instance(family, instance)

Arguments

family

char, the federated social media family e.g. "mastodon"

instance

char, the domain of the instance to collect from e.g. "mstdn.party"

Details

The network identifier built from family and instance is a persistent key: it names the plan file, the secrets and the network column of every post stored for it. Removing an instance and adding it back resumes on its former history, but renaming it orphans that history. The credentials still have to be provided with sm_api_set_auth, and the configuration is not written to disk, call save_config afterwards. The social media menu of setup does all of it at once.

Value

char, the identifier of the network collecting from this instance

See Also

sm_remove_instance

Examples

## Not run: 
   library(episomer)
   setup_config(file.choose())
   network <- sm_add_instance("mastodon", "mstdn.party")
   sm_api_set_auth(network)
   save_config()

## End(Not run)

episomer documentation built on Nov. 26, 2026, 5:07 p.m.