slack

package
v1.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Methods

type Methods map[string]*method

Methods collection for the Slack Web API. As listed at https://api.slack.com/web#methods

func GetFullCatalog

func GetFullCatalog(enabled bool) Methods

GetFullCatalog returns the collection of all supported methods.

type Response

type Response map[string]interface{}

Response from Slack Web API

func (*Response) Error

func (r *Response) Error() string

Error returns the error element if it exists

func (*Response) IsOK

func (r *Response) IsOK() bool

IsOK returns whether the request was successful

func (*Response) StatusCode

func (r *Response) StatusCode() int

StatusCode returns the status code for the response

func (*Response) Warning

func (r *Response) Warning() string

Warning returns the warning element if it exists

type WebAPIClient

type WebAPIClient interface {
	Do(methodURL string, body []byte) (Response, error)
}

WebAPIClient is an HTTP client for Slack Web API.

func NewWebAPIClient

func NewWebAPIClient(token, apiURL string, client *http.Client, methods Methods) WebAPIClient

NewWebAPIClient returns the default implementation of the Slack Web API client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL