slack

package
v0.0.0-...-8628dfb Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Token string `json:"access_token"`
	Scope string `json:"scope"`
}

type Auth

type Auth struct {
	UserId   string `json:"user_id"`
	Username string `json:"user"`
	Team     string `json:"team"`
	TeamId   string `json:"team_id"`
	TeamUrl  string `json:"url"`
}

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

func (*AuthService) Test

func (s *AuthService) Test() (*Auth, error)

type Group

type Group struct {
	Id         string
	Name       string
	IsArchived bool
}

type GroupList

type GroupList []Group

func (GroupList) FindName

func (list GroupList) FindName(name string) *Group

type GroupService

type GroupService struct {
	// contains filtered or unexported fields
}

func (*GroupService) List

func (g *GroupService) List() (GroupList, error)

type OAuthClient

type OAuthClient struct {
	ClientId     string
	ClientSecret string
	TeamId       string
	RedirectUri  string
	// contains filtered or unexported fields
}

func NewOAuthClient

func NewOAuthClient(clientID, clientSecret, redirectUri string) *OAuthClient

func (*OAuthClient) LoginUrl

func (cl *OAuthClient) LoginUrl(state string) *url.URL

func (*OAuthClient) RedeemCode

func (cl *OAuthClient) RedeemCode(code string) (*AccessToken, error)

type Response

type Response struct {
	*http.Response
}

type SlackClient

type SlackClient struct {
	BaseUrl *url.URL

	Token  string
	Groups *GroupService
	Auth   *AuthService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string) *SlackClient

func (*SlackClient) Do

func (s *SlackClient) Do(req *http.Request, v interface{}) (*Response, error)

func (*SlackClient) NewRequest

func (s *SlackClient) NewRequest(method, path string, body interface{}) (*http.Request, error)

Jump to

Keyboard shortcuts

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