A seatable_connection captures everything needed to reach a
particular SeaTable server: its URL, the environment variable holding your
API token, and (optionally) the workspace id and cache directory. It is the
single place server configuration lives, so downstream functions and
wrapper packages can bind one connection rather than passing
URL/token/workspace arguments around.
Arguments
- url
Base URL of the SeaTable server (e.g.
"https://cloud.seatable.io/"). Required — there is no default server.- token
Optional API token string embedded directly in the connection. When supplied it takes precedence over
token_envvar. It is redacted by the print method, but is still an ordinary list element — do not commit connections carrying an embedded token to shared repositories.- token_envvar
Name of the environment variable holding the API token, used when
tokenis not supplied. Defaults to theseatabler.token_envvaroption, or"SEATABLE_TOKEN".- workspace_id
Optional workspace id (character or numeric). When
NULLit is discovered from the base name where possible.- cachedir
Optional per-connection cache directory. When
NULLtheseatabler.cachediroption is used.- name
Optional short human-readable label for the connection.
- x
An object to test / print.
Details
By default the token itself is not stored in the object — only the
name of the environment variable that holds it (token_envvar), resolved
fresh at call time by seatable_token(). You may instead embed a literal
token, which is convenient when talking to several servers (each needs
its own token); the print method redacts it.