pjit-sms_api 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bd614f5c0e987391029e9738a2f31b8a2108366
4
- data.tar.gz: 73ac927c40cfc30bba944b7783089380d975b687
3
+ metadata.gz: 33b04a1835f14806e290e5a06c55c71ff4277077
4
+ data.tar.gz: 50c75389c9bb88c8363b7904f7c8508ad979c1a9
5
5
  SHA512:
6
- metadata.gz: 3b36f2af8dd455e877727466ad7afc8d1676403027412e2a8345b665998fda1efac7ae6542b6b595b184b03f4a11d326dd758852a77e7455a549115ff4a41623
7
- data.tar.gz: b7c14efeb72e72e6ff7e03cfbaaf7b4993b02ca86e86632fd60ee7f13054bf22f5efa5aef6eca12e70e853290b9aa6f17202efe8838a87039f31fdec2c84ced6
6
+ metadata.gz: eb452910840c11c8af0b10135e19ea3b85bd39e4c763136eeb172423040de2ed297a4e6c429de1a24fb3dfcf1e5c1e5277c265d291a47dcec6f33fa454b08da8
7
+ data.tar.gz: 01feea9e5f1a52bedc3f7323f4aa710de61d1b383754c7dfcb230fd11ac631b788e848ca3e7bbda47e9842061894e7f21995cb1b3cee8bb0e61daeb0a11d2ded
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ .rake_tasks~
@@ -3,8 +3,6 @@ require 'httparty'
3
3
 
4
4
  ##
5
5
  # TODO
6
- # DOTO
7
- # dubidubidu
8
6
  module SmsApi
9
7
  include HTTParty
10
8
  base_uri 'https://api.smsapi.pl'
@@ -14,16 +12,18 @@ module SmsApi
14
12
  format :json
15
13
 
16
14
  ##
17
- # Method to send ECO messages
18
- # usage: SmsApi.sms('MSISDN','message')
15
+ # Method to send SMS
16
+ # For 'Eco' messages you should pass only msisdn and message
17
+ # For Pro message you should set third argument 'from'
18
+ # usage: SmsApi.sms('MSISDN','message', 'from')
19
19
  # Some details about response
20
20
  # In response you will recive ['count'] of sended messages,
21
21
  # "list" of messages, on list you have some extra data:
22
22
  # "id" - message id, You can use it to grab message status,
23
23
  # "points" - cost of operation, "error" - error code if will ocure
24
- def self.sms(to, text)
24
+ def self.sms(to, text, from = 'Eco')
25
25
  test = ENV['SMSAPI_TEST'] || 0
26
- get('/sms.do', query: { to: to, test: test, message: text })
26
+ get('/sms.do', query: { to: to, test: test, message: text, from: from })
27
27
  end
28
28
 
29
29
  ##
@@ -1,3 +1,3 @@
1
1
  module SmsApi
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pjit-sms_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Jarosz