kave_rest_api 0.3 → 0.3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/kave_rest_api/requests/cancel.rb +1 -1
- data/lib/kave_rest_api/requests/countinbox.rb +1 -1
- data/lib/kave_rest_api/requests/countpostalcode.rb +1 -1
- data/lib/kave_rest_api/requests/deliver.rb +3 -3
- data/lib/kave_rest_api/requests/info.rb +1 -1
- data/lib/kave_rest_api/requests/selectoutbox.rb +1 -1
- data/lib/kave_rest_api/requests/send.rb +1 -1
- data/lib/kave_rest_api/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 312e11b72b0a99db5e8119ce82aaac5e1ac39ce522441d6ed8f1f33a2e1d2c3a
|
4
|
+
data.tar.gz: d21f2add77c60e8e4711de196f0818a18af1e060fd15fae14669c815b01cd255
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c94b020aef231db343b2c8b3c6f7ba9ee8ceb370b43e011f47e777e71086f42a9ae09d1d198f1585de5d82cf846d92f9f421a1bf9569957a7d30b2251b0ec475
|
7
|
+
data.tar.gz: b65d4f42f6bb7e4e76e13e28d63775160349f2887b0373e7def7f617aae779e47eec8ea35752b791cae6eefd025605be724594d37521df1918ea8cf29dbbb3e5
|
@@ -29,7 +29,7 @@ module KaveRestApi
|
|
29
29
|
def call
|
30
30
|
connection = Faraday.new(url: "#{API_URL}/sms/") do |faraday|
|
31
31
|
faraday.adapter Faraday.default_adapter
|
32
|
-
faraday.response FORMAT.to_sym
|
32
|
+
faraday.response @FORMAT.to_sym
|
33
33
|
end
|
34
34
|
response = connection.get(ACTION_NAME,isread: @isread, linenumber: @linenumber,startdate: @startdate,enddate: @enddate)
|
35
35
|
@response.validate(response.body)
|
@@ -23,7 +23,7 @@ module KaveRestApi
|
|
23
23
|
def call
|
24
24
|
connection = Faraday.new(url: "#{API_URL}/sms/") do |faraday|
|
25
25
|
faraday.adapter Faraday.default_adapter
|
26
|
-
faraday.response FORMAT.to_sym
|
26
|
+
faraday.response @FORMAT.to_sym
|
27
27
|
end
|
28
28
|
response = connection.get(ACTION_NAME,isread: @isread, linenumber: @linenumber,startdate: @startdate,enddate: @enddate)
|
29
29
|
@response.validate(response.body)
|
@@ -23,7 +23,7 @@ module KaveRestApi
|
|
23
23
|
def call
|
24
24
|
connection = Faraday.new(url: "#{API_URL}/sms/") do |faraday|
|
25
25
|
faraday.adapter Faraday.default_adapter
|
26
|
-
faraday.response FORMAT.to_sym
|
26
|
+
faraday.response @FORMAT.to_sym
|
27
27
|
end
|
28
28
|
response = connection.get(ACTION_NAME,countpostalcode: @countpostalcode)
|
29
29
|
@response.validate(response.body)
|
@@ -5,10 +5,10 @@ module KaveRestApi
|
|
5
5
|
attr_accessor :messageid
|
6
6
|
attr_reader :response
|
7
7
|
validates_presence_of :messageid
|
8
|
-
validates_format_of :messageid, :with => /^\d*$/, :if => Proc.new { !messageid.nil? }
|
8
|
+
validates_format_of :messageid, :with => /^\d+(,\d+)*$/, :if => Proc.new { !messageid.nil? }
|
9
9
|
|
10
10
|
def initialize(args = {})
|
11
|
-
@ACTION_NAME = [:status
|
11
|
+
@ACTION_NAME = [:status,'json'].join('.').freeze
|
12
12
|
@messageid = args.fetch(:messageid)
|
13
13
|
if @messageid.kind_of?(Array)
|
14
14
|
raise(ArgumentError,'Message Id Arrays: Buffer Overflow: Max length 3000 of array') if @messageid.length > 3000
|
@@ -21,7 +21,7 @@ module KaveRestApi
|
|
21
21
|
def call
|
22
22
|
connection = Faraday.new(url: "#{@API_URL}/sms/") do |faraday|
|
23
23
|
faraday.adapter Faraday.default_adapter
|
24
|
-
faraday.response
|
24
|
+
faraday.response :json
|
25
25
|
end
|
26
26
|
response = connection.get(@ACTION_NAME, messageid: @messageid)
|
27
27
|
@response.validate(response.body)
|
@@ -8,7 +8,7 @@ module KaveRestApi
|
|
8
8
|
def call
|
9
9
|
connection = Faraday.new(url: "#{API_URL}/account/") do |faraday|
|
10
10
|
faraday.adapter Faraday.default_adapter
|
11
|
-
faraday.response FORMAT.to_sym
|
11
|
+
faraday.response @FORMAT.to_sym
|
12
12
|
end
|
13
13
|
response = connection.get(@ACTION_NAME)
|
14
14
|
@response.validate(response.body)
|
@@ -21,7 +21,7 @@ module KaveRestApi
|
|
21
21
|
def call
|
22
22
|
connection = Faraday.new(url: "#{API_URL}/sms/") do |faraday|
|
23
23
|
faraday.adapter Faraday.default_adapter
|
24
|
-
faraday.response FORMAT.to_sym
|
24
|
+
faraday.response @FORMAT.to_sym
|
25
25
|
end
|
26
26
|
response = connection.get(ACTION_NAME, sender: @sender,startdate: @startdate,enddate: @enddate)
|
27
27
|
@response.validate(response.body)
|
@@ -5,7 +5,7 @@ module KaveRestApi
|
|
5
5
|
attr_reader :response,:message_size,:config
|
6
6
|
validates_presence_of :message
|
7
7
|
validates_presence_of :receptor
|
8
|
-
validates_length_of :message, :within => 1..
|
8
|
+
validates_length_of :message, :within => 1..900
|
9
9
|
validates_format_of :sender, :with => /^\d*$/, :if => Proc.new { !sender.nil? }
|
10
10
|
validates_format_of :unixdate, :with => /^\d*$/, :if => Proc.new { !unixdate.nil? }
|
11
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kave_rest_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mohammad mahmoudi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -185,7 +185,7 @@ homepage: https://github.com/mm580486/kave_rest_api/
|
|
185
185
|
licenses:
|
186
186
|
- MIT
|
187
187
|
metadata: {}
|
188
|
-
post_install_message:
|
188
|
+
post_install_message:
|
189
189
|
rdoc_options: []
|
190
190
|
require_paths:
|
191
191
|
- lib
|
@@ -200,9 +200,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
202
|
requirements: []
|
203
|
-
|
204
|
-
|
205
|
-
signing_key:
|
203
|
+
rubygems_version: 3.3.15
|
204
|
+
signing_key:
|
206
205
|
specification_version: 4
|
207
206
|
summary: Ruby gem to send and receive SMS via kavenegar API(rest)
|
208
207
|
test_files: []
|