slack

package
v1.24.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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