Class: Chuanglan::International
- Inherits:
-
Object
- Object
- Chuanglan::International
- Defined in:
- lib/chuanglan/international.rb
Constant Summary collapse
- GATEWAY =
'https://intapi.253.com'
Class Attribute Summary collapse
-
.password ⇒ Object
Returns the value of attribute password.
-
.signature ⇒ Object
Returns the value of attribute signature.
-
.timeout ⇒ Object
Returns the value of attribute timeout.
-
.username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Class Attribute Details
.password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/chuanglan/international.rb', line 6 def password @password end |
.signature ⇒ Object
Returns the value of attribute signature.
6 7 8 |
# File 'lib/chuanglan/international.rb', line 6 def signature @signature end |
.timeout ⇒ Object
Returns the value of attribute timeout.
6 7 8 |
# File 'lib/chuanglan/international.rb', line 6 def timeout @timeout end |
.username ⇒ Object
Returns the value of attribute username.
6 7 8 |
# File 'lib/chuanglan/international.rb', line 6 def username @username end |
Class Method Details
.send_to!(recipients, message, params = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/chuanglan/international.rb', line 8 def send_to!(recipients, , params = {}) params = base_params.merge(params) params[:da] = Array(recipients).join(',') params[:sm] = "#{params.delete(:signature) || signature}#{}" rsp = Request.new("#{GATEWAY}/mt", params).perform success_or_raise_exception(rsp) end |