Skip to content

Latest commit

 

History

History
343 lines (220 loc) · 18.3 KB

File metadata and controls

343 lines (220 loc) · 18.3 KB

Slack

Overview

Available Operations

create_uuid

CreateSlackUuid

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.create_uuid(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.GoogleProtobufEmpty ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceCreateSlackUUIDResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

delete_installation

DeleteInstallation

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.delete_installation()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
team_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceDeleteInstallationResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_current_user

GetCurrentUser

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.get_current_user(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.GoogleProtobufEmpty ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceGetCurrentUserResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

handle_o_auth_callback

HandleSlackOAuthCallback

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.handle_o_auth_callback()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
code Optional[str] ➖ OAuth code from Slack
state Optional[str] ➖ State containing orgId, memberId, uuid
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceHandleSlackOAuthCallbackResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_channels

ListChannels

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.list_channels(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.GoogleProtobufEmpty ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceListChannelsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_installations

ListInstallations

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.list_installations(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.GoogleProtobufEmpty ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceListInstallationsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_users

ListUsers

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.list_users(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.GoogleProtobufEmpty ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceListUsersResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

sync_workspace

SyncWorkspace

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.slack.sync_workspace()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
team_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.SlackServiceSyncWorkspaceResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*