go xmpp bot
Go to file
AnisB f9159b0797 update
Former-commit-id: e74112783c1cc52c77eda824f1234946a313ad8e
2021-02-08 19:50:26 +02:00
.gitignore Reworked XMPP client connection 2020-09-25 19:42:44 +01:00
config.yml update 2021-02-08 19:50:26 +02:00
dockerfile dockerfile added 2020-12-25 18:14:26 +01:00
dockerfile.volume fix dockerfile 2021-01-02 11:33:14 +02:00
go.mod Reworked XMPP client connection 2020-09-25 19:42:44 +01:00
go.sum Reworked XMPP client connection 2020-09-25 19:42:44 +01:00
hodlhodl-bot.REMOVED.git-id update 2021-02-08 19:50:26 +02:00
main.go quick fix bug 2021-01-02 10:25:03 +01:00
README.md Working notifcation but crash if empty 2020-09-30 18:56:46 +01:00

hodlhodl-bot

Simple golang command to call HODLHODL API endpoints.

The command usage is as following:

./hodlhodl-bot [-t] watchs-notifs

-t: sleep time in seconds between each call to api when running in daemon watch mode (default: 120)

watch: the watch command keeps running and polling the notifications endpoint, if new notifications are detected print them stdou. In this mode the program can only be stopped with CTRL+C

TESTING

for testing purposes, create two accounts on TESTNET version of hodlhodl https://hhtestnet.com/ , create a fake listing with one account, and accept offer with the other account and send messages to generate notifications for the first account.

NOTES

  • Logger working : setup in main funciton
  • readconfig function : using viper lib, parse config.yml
  • startclient function : Working XMPP client with
  • startmessage function : send message
  • gethdlnotification : send the correct string without crasing the app -----> in progress