grove.connectors.slack package

Slack connectors for Grove.

Submodules

grove.connectors.slack.api module

Slack Audit API client.

The official Slack SDK does not currently support the Audit API, this client has been created in the interim.

class grove.connectors.slack.api.Client(token: str | None = None, retry: bool | None = True)[source]

Bases: object

get_logs(latest: str | None = None, oldest: str | None = None, action: str | None = None, cursor: str | None = None) AuditLogEntries[source]

Fetches a list of audit logs which match the provided filters.

Parameters:
  • latest – Unix timestamp of the most recent event to include (inclusive).

  • oldest – Unix timestamp of the least recent event to include (inclusive).

  • action – Name of the action to request events for.

  • cursor – Cursor to use when fetching events (pagination).

Returns:

AuditLogEntries object containing a pagination cursor, and log entries.

grove.connectors.slack.audit_logs module

Slack Audit connector for Grove.

class grove.connectors.slack.audit_logs.Connector(config: ConnectorConfig, context: Dict[str, str])[source]

Bases: BaseConnector

LOG_ORDER = 'REVERSE_CHRONOLOGICAL'
NAME = 'slack_audit_logs'
POINTER_PATH = 'date_create'
collect()[source]

Collects all logs from the Slack Audit API.

This will first check whether there are any pointers cached to indicate previous collections. If not, the last week of data will be collected.