Module: Dianji::Sms
Instance Method Summary collapse
Instance Method Details
#send_to(phone, content, timestamps, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/dianji/sms.rb', line 5 def send_to(phone, content, , = {}) = .merge({ account: Dianji.account, password: ::Digest::MD5.hexdigest([Dianji.password, phone, ].join), mobile: phone, content: "#{Dianji.signature}#{content}", timestamps: }) JSON.parse RestClient.post("#{Dianji.gateway}/msgHttp/json/mt", ) end |