gupshup-rb 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gupshup-rb.gemspec +0 -5
- data/lib/gupshup-rb/rest/client.rb +8 -6
- data/lib/gupshup-rb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf5db81c18cb9621adffab8eb700bebe5cf25d197a6ce887036c475bf9a219bd
|
4
|
+
data.tar.gz: a9b4137e2e02f76521dd45b1518266bfac6bc115b1a9793a76b6dac2cf6ff0c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
15
|
-
@src_name = src_name
|
16
|
-
@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
|
-
|
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(
|
32
|
-
|
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
|
data/lib/gupshup-rb/version.rb
CHANGED