GSS.Registry (elixir_google_spreadsheets v1.0.1)

Copy Markdown

Thin facade over Elixir's Registry for locating running spreadsheet processes.

The registry process itself is started in GSS.start/2 as {Registry, keys: :unique, name: GSS.Registry} — the module name doubles as the registry's process name. Spreadsheet GenServers register themselves via {:via, Registry, {GSS.Registry, key/2}}, so this module only builds the lookup key and resolves it back to a pid. Authentication lives in GSS.Auth.

Summary

Functions

Build the registry key for a spreadsheet id, scoped by :list_name when present.

Fetch a Google Spreadsheet process by its id (optionally scoped by :list_name).

token() deprecated

Functions

key(spreadsheet_id, opts \\ [])

@spec key(String.t(), Keyword.t()) :: {String.t(), String.t() | nil}

Build the registry key for a spreadsheet id, scoped by :list_name when present.

spreadsheet_pid(spreadsheet_id, opts \\ [])

@spec spreadsheet_pid(String.t(), Keyword.t()) :: pid() | nil

Fetch a Google Spreadsheet process by its id (optionally scoped by :list_name).

token()

This function is deprecated. Use GSS.Auth.token!/0 instead.

See GSS.Auth.token!/0.