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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 860af75d7b158d5977e338e2ebac5748775bacb4
4
- data.tar.gz: a3ac841abbd6e2db724a6ff703722a6a70fa3223
2
+ SHA256:
3
+ metadata.gz: 312e11b72b0a99db5e8119ce82aaac5e1ac39ce522441d6ed8f1f33a2e1d2c3a
4
+ data.tar.gz: d21f2add77c60e8e4711de196f0818a18af1e060fd15fae14669c815b01cd255
5
5
  SHA512:
6
- metadata.gz: ddab6c1ea0be26417d76f157abc1d988f84b410d31267924bf81c5d90dd1f727efb7fc26d2a7ec28f3e69d65b78bd412e5a5e4bc2527193f57f90f9e63e8c2cd
7
- data.tar.gz: 6ec84edf3d2616f934117762cf5add118c01a5916caffb75ec7d03cb1ec88cad37ffa0e832f9c0e774452fdbf7e9d0fffeed226b4379a5952564c48fb9560b28
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,@FORMAT].join('.').freeze
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 FORMAT.to_sym
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..140
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
 
@@ -1,3 +1,3 @@
1
1
  module KaveRestApi
2
- VERSION = "0.3"
2
+ VERSION = "0.3.1.1"
3
3
  end
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: '0.3'
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: 2019-09-12 00:00:00.000000000 Z
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
- rubyforge_project:
204
- rubygems_version: 2.5.2.3
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: []