gupshup-rb 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea605ffe913712cfa8a0faa5dd2c254cd15d080766e6daf7a865e36dcf25a765
4
- data.tar.gz: 53bd98d66908077a92e0b703a0f8979ccd9dde8004e0bfe9864ca90e6849a6c7
3
+ metadata.gz: cf5db81c18cb9621adffab8eb700bebe5cf25d197a6ce887036c475bf9a219bd
4
+ data.tar.gz: a9b4137e2e02f76521dd45b1518266bfac6bc115b1a9793a76b6dac2cf6ff0c1
5
5
  SHA512:
6
- metadata.gz: f7f289b62c7f0ef59528c0e85bcb1a9d1db6f4725e68bd3c64f57e25bdd2be403ecb222b3cecab71f3dfffab9a2bcea27520651721a36c76804233ed52d92972
7
- data.tar.gz: 2167a2922f12ab74e1d7265e8a5fd684c2b142e1e7f77d1a853bc5f79449126c6dcf7fa1ddcf00a2659348910bf0b1a44b556487e5c942e5134285ec30063c23
6
+ metadata.gz: 6741e3738f76140fa52062cb3f38755cb52e119b0776df00f147a523d065f245a34da151e89e49e242d146bd264b4005ca71fdecd205b0f796483228739c3549
7
+ data.tar.gz: f981a97632c0c0e5c49e49b9790afb7b851a913e1aa509e7e57a4c35361f9766637433b7bc004a7fd9aef58ec70fe26a4f11b354239f69be686010596368199a
data/gupshup-rb.gemspec CHANGED
@@ -18,12 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.metadata["source_code_uri"] = 'https://github.com/raimartinsb/gupshup-rb'
19
19
  #spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match?(%r{^(spec)/}) }
20
20
  #spec.files = `git ls-files -z`.split("\x0").grep(%r{^(?!spec)/})
21
- #spec.files = `git ls-files -z`.split("\x0").grep(%r{^(?!spec/|gupshup-rb\.gemspec$)})
22
21
  spec.files = `git ls-files -z`.split("\x0").grep(%r{^(?!spec/)(?!.*\.gem$)})
23
-
24
-
25
-
26
-
27
22
  #spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
28
23
  spec.require_paths = ['lib']
29
24
 
@@ -11,11 +11,11 @@ module Gupshup
11
11
 
12
12
  ##
13
13
  # Initializes the Gupshup Client
14
- def initialize(username=nil, password=nil, src_name=nil, region=nil, http_client=nil, logger=nil, user_agent_extensions=nil)
15
- @src_name = src_name || Gupshup.src_name
16
- @api_key = password || Gupshup.api_key
14
+ def initialize(src_name=nil, api_key=nil)
15
+ @src_name = src_name
16
+ @api_key = api_key
17
17
  @auth = [@src_name, @api_key]
18
- @logger = logger || Gupshup.logger
18
+ #$@logger = logger || Gupshup.logger
19
19
  @user_agent_extensions = user_agent_extensions || []
20
20
 
21
21
  # Domains
@@ -28,8 +28,10 @@ module Gupshup
28
28
  @video = nil
29
29
  end
30
30
 
31
- def messages(sid=:unset)
32
- self.api.v1.messages(sid)
31
+ def messages(to=nil, from=nil, body=nil, api_key=nil, src_name=nil)
32
+ message_list = Gupshup::REST::Api::V1::MessageList.new('v1', src_name: src_name)
33
+
34
+ message_list.create(to: to, from: from, body: body, media_url: '', content_type: 'text', api_key: api_key, src_name: src_name)
33
35
  end
34
36
  ##
35
37
  # Provide a user friendly representation
@@ -1,3 +1,3 @@
1
1
  module Gupshup
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gupshup-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raimundo Martins