diff --git a/docs/static/api-docs/slack_sdk/aiohttp_version_checker.html b/docs/static/api-docs/slack_sdk/aiohttp_version_checker.html index ab2134685..27747363f 100644 --- a/docs/static/api-docs/slack_sdk/aiohttp_version_checker.html +++ b/docs/static/api-docs/slack_sdk/aiohttp_version_checker.html @@ -2,21 +2,18 @@ - - + + slack_sdk.aiohttp_version_checker API documentation - - - - - - + + + + + + - - + +
@@ -26,6 +23,34 @@

Module slack_sdk.aiohttp_version_checker

Internal module for checking aiohttp compatibility of async modules

+
+ +Expand source code + +
"""Internal module for checking aiohttp compatibility of async modules"""
+import logging
+from typing import Callable
+
+
+def _print_warning_log(message: str) -> None:
+    logging.getLogger(__name__).warning(message)
+
+
+def validate_aiohttp_version(
+    aiohttp_version: str,
+    print_warning: Callable[[str], None] = _print_warning_log,
+):
+    if aiohttp_version is not None:
+        elements = aiohttp_version.split(".")
+        if len(elements) >= 3:
+            # patch version can be a non-numeric value
+            major, minor, patch = int(elements[0]), int(elements[1]), elements[2]
+            if major <= 2 or (major == 3 and (minor == 6 or (minor == 7 and patch == "0"))):
+                print_warning(
+                    "We highly recommend upgrading aiohttp to 3.7.3 or higher versions."
+                    "An older version of the library may not work with the Slack server-side in the future."
+                )
+
@@ -39,6 +64,25 @@

Functions

+
+ +Expand source code + +
def validate_aiohttp_version(
+    aiohttp_version: str,
+    print_warning: Callable[[str], None] = _print_warning_log,
+):
+    if aiohttp_version is not None:
+        elements = aiohttp_version.split(".")
+        if len(elements) >= 3:
+            # patch version can be a non-numeric value
+            major, minor, patch = int(elements[0]), int(elements[1]), elements[2]
+            if major <= 2 or (major == 3 and (minor == 6 or (minor == 7 and patch == "0"))):
+                print_warning(
+                    "We highly recommend upgrading aiohttp to 3.7.3 or higher versions."
+                    "An older version of the library may not work with the Slack server-side in the future."
+                )
+
@@ -46,6 +90,7 @@

Functions

- + \ No newline at end of file diff --git a/docs/static/api-docs/slack_sdk/audit_logs/async_client.html b/docs/static/api-docs/slack_sdk/audit_logs/async_client.html index 52fca94f3..9f86511a0 100644 --- a/docs/static/api-docs/slack_sdk/audit_logs/async_client.html +++ b/docs/static/api-docs/slack_sdk/audit_logs/async_client.html @@ -2,21 +2,18 @@ - - + + slack_sdk.audit_logs.async_client API documentation - - - - - - + + + + + + - - + +
@@ -25,6 +22,16 @@

Module slack_sdk.audit_logs.async_client

+
+ +Expand source code + +
from .v1.async_client import AsyncAuditLogsClient
+
+__all__ = [
+    "AsyncAuditLogsClient",
+]
+
@@ -477,12 +484,65 @@

Args

Returns

API response

+
+ +Expand source code + +
async def actions(
+    self,
+    *,
+    query_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    """Returns information about the kind of actions that the Audit Logs API
+    returns as a list of all actions and a short description of each.
+    Authentication not required.
+
+    Args:
+        query_params: Set any values if you want to add query params
+        headers: Additional request headers
+
+    Returns:
+        API response
+    """
+    return await self.api_call(
+        path="actions",
+        query_params=query_params,
+        headers=headers,
+    )
+
async def api_call(self, *, http_verb: str = 'GET', path: str, query_params: Optional[Dict[str, Any]] = None, body_params: Optional[Dict[str, Any]] = None, headers: Optional[Dict[str, str]] = None) ‑> AuditLogsResponse
+
+ +Expand source code + +
async def api_call(
+    self,
+    *,
+    http_verb: str = "GET",
+    path: str,
+    query_params: Optional[Dict[str, Any]] = None,
+    body_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    url = f"{self.base_url}{path}"
+    return await self._perform_http_request(
+        http_verb=http_verb,
+        url=url,
+        query_params=query_params,
+        body_params=body_params,
+        headers=_build_request_headers(
+            token=self.token,
+            default_headers=self.default_headers,
+            additional_headers=headers,
+        ),
+    )
+
async def logs(self, *, latest: Optional[int] = None, oldest: Optional[int] = None, limit: Optional[int] = None, action: Optional[str] = None, actor: Optional[str] = None, entity: Optional[str] = None, cursor: Optional[str] = None, additional_query_params: Optional[Dict[str, Any]] = None, headers: Optional[Dict[str, str]] = None) ‑> AuditLogsResponse @@ -519,6 +579,65 @@

Args

Returns

API response

+
+ +Expand source code + +
async def logs(
+    self,
+    *,
+    latest: Optional[int] = None,
+    oldest: Optional[int] = None,
+    limit: Optional[int] = None,
+    action: Optional[str] = None,
+    actor: Optional[str] = None,
+    entity: Optional[str] = None,
+    cursor: Optional[str] = None,
+    additional_query_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    """This is the primary endpoint for retrieving actual audit events from your organization.
+    It will return a list of actions that have occurred on the installed workspace or grid organization.
+    Authentication required.
+
+    The following filters can be applied in order to narrow the range of actions returned.
+    Filters are added as query string parameters and can be combined together.
+    Multiple filter parameters are additive (a boolean AND) and are separated
+    with an ampersand (&) in the query string. Filtering is entirely optional.
+
+    Args:
+        latest: Unix timestamp of the most recent audit event to include (inclusive).
+        oldest: Unix timestamp of the least recent audit event to include (inclusive).
+            Data is not available prior to March 2018.
+        limit: Number of results to optimistically return, maximum 9999.
+        action: Name of the action.
+        actor: User ID who initiated the action.
+        entity: ID of the target entity of the action (such as a channel, workspace, organization, file).
+        cursor: The next page cursor of pagination
+        additional_query_params: Add anything else if you need to use the ones this library does not support
+        headers: Additional request headers
+
+    Returns:
+        API response
+    """
+    query_params = {
+        "latest": latest,
+        "oldest": oldest,
+        "limit": limit,
+        "action": action,
+        "actor": actor,
+        "entity": entity,
+        "cursor": cursor,
+    }
+    if additional_query_params is not None:
+        query_params.update(additional_query_params)
+    query_params = {k: v for k, v in query_params.items() if v is not None}
+    return await self.api_call(
+        path="logs",
+        query_params=query_params,
+        headers=headers,
+    )
+
async def schemas(self, *, query_params: Optional[Dict[str, Any]] = None, headers: Optional[Dict[str, str]] = None) ‑> AuditLogsResponse @@ -536,6 +655,32 @@

Args

Returns

API response

+
+ +Expand source code + +
async def schemas(
+    self,
+    *,
+    query_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    """Returns information about the kind of objects which the Audit Logs API
+    returns as a list of all objects and a short description.
+    Authentication not required.
+
+    Args:
+        query_params: Set any values if you want to add query params
+        headers: Additional request headers
+    Returns:
+        API response
+    """
+    return await self.api_call(
+        path="schemas",
+        query_params=query_params,
+        headers=headers,
+    )
+
@@ -543,6 +688,7 @@

Returns

- + \ No newline at end of file diff --git a/docs/static/api-docs/slack_sdk/audit_logs/index.html b/docs/static/api-docs/slack_sdk/audit_logs/index.html index 818bc4a6d..3c1c3aac9 100644 --- a/docs/static/api-docs/slack_sdk/audit_logs/index.html +++ b/docs/static/api-docs/slack_sdk/audit_logs/index.html @@ -2,21 +2,18 @@ - - + + slack_sdk.audit_logs API documentation - - - - - - + + + + + + - - + +
@@ -27,6 +24,22 @@

Module slack_sdk.audit_logs

Audit Logs API is a set of APIs for monitoring what’s happening in your Enterprise Grid organization.

Refer to https://slack.dev/python-slack-sdk/audit-logs/ for details.

+
+ +Expand source code + +
"""Audit Logs API is a set of APIs for monitoring what’s happening in your Enterprise Grid organization.
+
+Refer to https://slack.dev/python-slack-sdk/audit-logs/ for details.
+"""
+from .v1.client import AuditLogsClient
+from .v1.response import AuditLogsResponse
+
+__all__ = [
+    "AuditLogsClient",
+    "AuditLogsResponse",
+]
+

Sub-modules

@@ -473,12 +486,69 @@

Args

Returns

API response

+
+ +Expand source code + +
def actions(
+    self,
+    *,
+    query_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    """Returns information about the kind of actions that the Audit Logs API
+    returns as a list of all actions and a short description of each.
+    Authentication not required.
+
+    Args:
+        query_params: Set any values if you want to add query params
+        headers: Additional request headers
+
+    Returns:
+        API response
+    """
+    return self.api_call(
+        path="actions",
+        query_params=query_params,
+        headers=headers,
+    )
+
def api_call(self, *, http_verb: str = 'GET', path: str, query_params: Optional[Dict[str, Any]] = None, body_params: Optional[Dict[str, Any]] = None, headers: Optional[Dict[str, str]] = None) ‑> AuditLogsResponse

Performs a Slack API request and returns the result.

+
+ +Expand source code + +
def api_call(
+    self,
+    *,
+    http_verb: str = "GET",
+    path: str,
+    query_params: Optional[Dict[str, Any]] = None,
+    body_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    """Performs a Slack API request and returns the result."""
+    url = f"{self.base_url}{path}"
+    query = _build_query(query_params)
+    if len(query) > 0:
+        url += f"?{query}"
+
+    return self._perform_http_request(
+        http_verb=http_verb,
+        url=url,
+        body=body_params,
+        headers=_build_request_headers(
+            token=self.token,
+            default_headers=self.default_headers,
+            additional_headers=headers,
+        ),
+    )
+
def logs(self, *, latest: Optional[int] = None, oldest: Optional[int] = None, limit: Optional[int] = None, action: Optional[str] = None, actor: Optional[str] = None, entity: Optional[str] = None, cursor: Optional[str] = None, additional_query_params: Optional[Dict[str, Any]] = None, headers: Optional[Dict[str, str]] = None) ‑> AuditLogsResponse @@ -515,6 +585,65 @@

Args

Returns

API response

+
+ +Expand source code + +
def logs(
+    self,
+    *,
+    latest: Optional[int] = None,
+    oldest: Optional[int] = None,
+    limit: Optional[int] = None,
+    action: Optional[str] = None,
+    actor: Optional[str] = None,
+    entity: Optional[str] = None,
+    cursor: Optional[str] = None,
+    additional_query_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    """This is the primary endpoint for retrieving actual audit events from your organization.
+    It will return a list of actions that have occurred on the installed workspace or grid organization.
+    Authentication required.
+
+    The following filters can be applied in order to narrow the range of actions returned.
+    Filters are added as query string parameters and can be combined together.
+    Multiple filter parameters are additive (a boolean AND) and are separated
+    with an ampersand (&) in the query string. Filtering is entirely optional.
+
+    Args:
+        latest: Unix timestamp of the most recent audit event to include (inclusive).
+        oldest: Unix timestamp of the least recent audit event to include (inclusive).
+            Data is not available prior to March 2018.
+        limit: Number of results to optimistically return, maximum 9999.
+        action: Name of the action.
+        actor: User ID who initiated the action.
+        entity: ID of the target entity of the action (such as a channel, workspace, organization, file).
+        cursor: The next page cursor of pagination
+        additional_query_params: Add anything else if you need to use the ones this library does not support
+        headers: Additional request headers
+
+    Returns:
+        API response
+    """
+    query_params = {
+        "latest": latest,
+        "oldest": oldest,
+        "limit": limit,
+        "action": action,
+        "actor": actor,
+        "entity": entity,
+        "cursor": cursor,
+    }
+    if additional_query_params is not None:
+        query_params.update(additional_query_params)
+    query_params = {k: v for k, v in query_params.items() if v is not None}
+    return self.api_call(
+        path="logs",
+        query_params=query_params,
+        headers=headers,
+    )
+
def schemas(self, *, query_params: Optional[Dict[str, Any]] = None, headers: Optional[Dict[str, str]] = None) ‑> AuditLogsResponse @@ -532,6 +661,32 @@

Args

Returns

API response

+
+ +Expand source code + +
def schemas(
+    self,
+    *,
+    query_params: Optional[Dict[str, Any]] = None,
+    headers: Optional[Dict[str, str]] = None,
+) -> AuditLogsResponse:
+    """Returns information about the kind of objects which the Audit Logs API
+    returns as a list of all objects and a short description.
+    Authentication not required.
+
+    Args:
+        query_params: Set any values if you want to add query params
+        headers: Additional request headers
+    Returns:
+        API response
+    """
+    return self.api_call(
+        path="schemas",
+        query_params=query_params,
+        headers=headers,
+    )
+
@@ -598,7 +753,7 @@

Class variables

Instance variables

-
prop typed_body : Optional[LogsResponse]
+
var typed_body : Optional[LogsResponse]
@@ -618,6 +773,7 @@

Instance variables