mirror of
https://github.com/nikoksr/notify.git
synced 2024-11-28 08:39:13 +02:00
Merge branch 'feature/TwitterService' of https://github.com/KrishanBhalla/notify into feature/TwitterService
This commit is contained in:
commit
0066ddcd95
@ -83,7 +83,7 @@ _ = notifier.Send(
|
||||
- Slack support: [slack-go/slack](https://github.com/slack-go/slack)
|
||||
- Telegram support: [go-telegram-bot-api/telegram-bot-api](https://github.com/go-telegram-bot-api/telegram-bot-api)
|
||||
- Logo: [MariaLetta/free-gophers-pack](https://github.com/MariaLetta/free-gophers-pack)
|
||||
- Twitter: [github.com/dghubble/go-twitter/twitter](github.com/dghubble/go-twitter/twitter)
|
||||
- Twitter: [dghubble/go-twitter/twitter](https://github.com/dghubble/go-twitter/twitter)
|
||||
|
||||
## Author <a id="author"></a>
|
||||
|
||||
@ -99,4 +99,3 @@ Contributions, issues and feature requests are welcome!<br />Feel free to check
|
||||
## Show your support <a id="support"></a>
|
||||
|
||||
Give a ⭐️ if this project helped you!
|
||||
|
||||
|
@ -48,7 +48,8 @@ func New(credentials Credentials) (*Twitter, error) {
|
||||
|
||||
// we can retrieve the user and verify if the credentials
|
||||
// we have used successfully allow us to log in!
|
||||
if _, _, err := client.Accounts.VerifyCredentials(verifyParams); err != nil {
|
||||
_, _, err := client.Accounts.VerifyCredentials(verifyParams)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -90,7 +91,8 @@ func (t Twitter) Send(subject, message string) error {
|
||||
Event: directMessageEvent,
|
||||
}
|
||||
|
||||
if _, _, err := t.client.DirectMessages.EventsNew(directMessageParams); err != nil {
|
||||
_, _, err := t.client.DirectMessages.EventsNew(directMessageParams)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to send direct message to twitter ID '%d'", twitterID)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user