mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Added SMSGlobal config variable support.
This commit is contained in:
@@ -13,6 +13,8 @@ type SMSContacts struct {
|
||||
|
||||
type Config struct {
|
||||
Name string
|
||||
SMSGlobalUsername string
|
||||
SMSGlobalPassword string
|
||||
SMSContacts []SMSContacts
|
||||
Exchanges []Exchanges
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"Name": "Skynet",
|
||||
"SMSGlobalUsername": "Username",
|
||||
"SMSGlobalPassword": "Password",
|
||||
"SMSContacts" : [
|
||||
{
|
||||
"Name": "Bob",
|
||||
|
||||
@@ -13,12 +13,12 @@ const (
|
||||
SMSGLOBAL_API_URL = "http://www.smsglobal.com/http-api.php"
|
||||
)
|
||||
|
||||
func SMSNotify(username, password, from, to, message string) (error) {
|
||||
func SMSNotify(to, message string) (error) {
|
||||
values := url.Values{}
|
||||
values.Set("action", "sendsms")
|
||||
values.Set("user", username)
|
||||
values.Set("password", password)
|
||||
values.Set("from", from)
|
||||
values.Set("user", bot.config.SMSGlobalUsername)
|
||||
values.Set("password", bot.config.SMSGlobalPassword)
|
||||
values.Set("from", bot.config.Name)
|
||||
values.Set("to", to)
|
||||
values.Set("text", message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user