Skip to content

zier/goslack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goslack

###Features

  • Send message to slack (WebHook)
  • Get history messages from channel (SlackAPI)

###Example New if you want only get message from channel don't want to send to you can empty string to url web hook

slack := New("yourSlackUrlHook", "yourSlackToken", nil)

###Example send message (use default channel in webhook setting) slack.Send("Hello World","")

###Example send with channel

slack.Send("Hello World","#game")

###Example get message from channel you can read more about response message value in document channels.history

//HistoryResponse response from slack
type HistoryResponse struct {
	Ok       bool
	Messages []map[string]string
	HasMore  string
}

resp, err := slack.GetHistoryFromChannel("CHANNELID", startDate, endDate, limit)

  • you can find your channel id here

About

golang simple slack api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages