kave_rest_api 0.3 → 0.3.1
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 +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 +2 -2
- 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: f2709fbc88e59d5f33249fc71bc208f4ec23efc30b17258663466fda3dceaf1f
|
4
|
+
data.tar.gz: c932eabe3654225e41459cbae6a55b823aa7ee7ebfe621d90216d1330c05e7b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69785cf408ddd22f83c3c412e6be50926de1ceeeafe3b81ae4c535d77f01dacf224e154ac2943046befd1d903b851a47e86ad6f8009694c8ffebe382e091b0e5
|
7
|
+
data.tar.gz: 1ac0278947643c1219539bb5f9a2fa230a66b04ca4d66dd87ce4879c4a9262e1926f999a4931a0d4489529e4ce5f52de57ee6e685156c4495524f4faccea537a
|
@@ -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,7 +5,7 @@ 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
11
|
@ACTION_NAME = [:status,@FORMAT].join('.').freeze
|
@@ -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
|
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: []
|