Add slack webhook integration

This commit is contained in:
Daniel Mason 2021-09-01 23:20:47 +12:00
parent c109f08589
commit 1718cc052d
Signed by: idanoo
GPG key ID: 387387CDBC02F132
9 changed files with 107 additions and 5 deletions

View file

@ -22,6 +22,10 @@ func postToTwitter() {
return
}
if len(updatedLocations.Locations) == 0 {
return
}
config := oauth1.NewConfig(TwitterCreds.ConsumerKey, TwitterCreds.ConsumerSecret)
token := oauth1.NewToken(TwitterCreds.AccessToken, TwitterCreds.AccessTokenSecret)
httpClient := config.Client(oauth1.NoContext, token)