gupshup-rb 0.1.9 → 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: 5c85ca7254d2d5d8d68703723f1898018bc883371d54c819fa1b64b104c4b2e3
4
- data.tar.gz: 3167ef6a4cc750fa4f836fdd5d7707eae43d2b8db3ca0f78fe8b2767814a909e
3
+ metadata.gz: cf5db81c18cb9621adffab8eb700bebe5cf25d197a6ce887036c475bf9a219bd
4
+ data.tar.gz: a9b4137e2e02f76521dd45b1518266bfac6bc115b1a9793a76b6dac2cf6ff0c1
5
5
  SHA512:
6
- metadata.gz: f6d6a604607b3edb65a107bd014131fd3e3be3d735554080a5df563769d43feac0150f7d7e3ca24735c585615d42b974d8c3b7b11fc34414e122527be2bbc0d4
7
- data.tar.gz: f5131059df910e6fa3acec9a22578aad92aac894d0cb0d1fdcdcdda85c9ac9e6ca0ea9bc33cae41e2318febc344414ae1477161012051a1364b6783d5e483053
6
+ metadata.gz: 6741e3738f76140fa52062cb3f38755cb52e119b0776df00f147a523d065f245a34da151e89e49e242d146bd264b4005ca71fdecd205b0f796483228739c3549
7
+ data.tar.gz: f981a97632c0c0e5c49e49b9790afb7b851a913e1aa509e7e57a4c35361f9766637433b7bc004a7fd9aef58ec70fe26a4f11b354239f69be686010596368199a
data/gupshup-rb.gemspec CHANGED
@@ -16,8 +16,10 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = 'https://github.com/raimartinsb/gupshup-rb'
19
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match?(%r{^(spec)/}) }
20
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ #spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match?(%r{^(spec)/}) }
20
+ #spec.files = `git ls-files -z`.split("\x0").grep(%r{^(?!spec)/})
21
+ spec.files = `git ls-files -z`.split("\x0").grep(%r{^(?!spec/)(?!.*\.gem$)})
22
+ #spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
23
  spec.require_paths = ['lib']
22
24
 
23
25
  spec.add_dependency('jwt', '>= 1.5', '< 3.0')
@@ -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.1.9'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gupshup-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raimundo Martins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-05 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -190,9 +190,7 @@ dependencies:
190
190
  version: 1.4.2
191
191
  description: Communication with Chatwoot - Not Completed! Still does not work!
192
192
  email:
193
- executables:
194
- - console
195
- - setup
193
+ executables: []
196
194
  extensions: []
197
195
  extra_rdoc_files: []
198
196
  files:
@@ -206,13 +204,6 @@ files:
206
204
  - Rakefile
207
205
  - bin/console
208
206
  - bin/setup
209
- - gupshup-rb-0.1.0.gem
210
- - gupshup-rb-0.1.1.gem
211
- - gupshup-rb-0.1.2.gem
212
- - gupshup-rb-0.1.3.gem
213
- - gupshup-rb-0.1.4.gem
214
- - gupshup-rb-0.1.5.gem
215
- - gupshup-rb-0.1.6.gem
216
207
  - gupshup-rb.gemspec
217
208
  - lib/gupshup-rb.rb
218
209
  - lib/gupshup-rb/framework/gupshup_response.rb
data/gupshup-rb-0.1.0.gem DELETED
Binary file
data/gupshup-rb-0.1.1.gem DELETED
Binary file
data/gupshup-rb-0.1.2.gem DELETED
Binary file
data/gupshup-rb-0.1.3.gem DELETED
Binary file
data/gupshup-rb-0.1.4.gem DELETED
Binary file
data/gupshup-rb-0.1.5.gem DELETED
Binary file
data/gupshup-rb-0.1.6.gem DELETED
Binary file