whatsapp_sdk 0.5.1 → 0.6.0

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: 5ed72c3c8b37576bd66fd20d2cb4b1057118b164a7dfd1beee06d3ea9e643baa
4
- data.tar.gz: 82629ab66d2b098d4b3d4b3a5dd201182444769448e8259625f04de4370a1bc3
3
+ metadata.gz: e174b898e076d20337b2566c9467a0fc6ab2e8aa5d3f4185dd8bcec6a754d25f
4
+ data.tar.gz: 2fbb40187adeb8006b345c6b37de12c575cd9f6d1625f5e1befff2caaa3c0568
5
5
  SHA512:
6
- metadata.gz: 3e2624a444b24964b9d4254dcbb2baa0e99bfaa5300dd3e03cdc2ec4870b73f04084562bdb0a9f9cbbdd2877afbe8face27e297700f9c0a27118851459ec33c9
7
- data.tar.gz: dbd91d2753ddddebd117984dd10b301bccb0805ced290ce5d01578e237e70d340a4db0ef02ce9aff8396d554e8cafa57659f6f1e885388960cb492c0b9c54a05
6
+ metadata.gz: cd4aa67163bb7ebcab95865b583d779d209453b383df131d46ac7baddf6002f37276c627a332f4ac3f792549a2f4d4d9bed27486e9500042b850c17e4ba03dcd
7
+ data.tar.gz: 1ed23faa24804aebf48733a24c8d42ada544f5895ff5323fc0cac172c0bf4becf51abf3e75eadb85f3d5ead98beb3c1cd0d18fc329e10fdc1ce0b4139a07c3c2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v 0.6.0
2
+ Fix issue on Linux when files are not sorted [#45](https://github.com/ignacio-chiazzo/ruby_whatsapp_sdk/pull/45)
3
+
1
4
  # v 0.5.1
2
5
  Remove warnings [#41](https://github.com/ignacio-chiazzo/ruby_whatsapp_sdk/pull/41)
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- whatsapp_sdk (0.5.0)
4
+ whatsapp_sdk (0.6.0)
5
5
  faraday (~> 2.3.0)
6
6
  faraday-multipart (~> 1.0.4)
7
7
  oj (~> 3.13.13)
data/README.md CHANGED
@@ -324,21 +324,25 @@ Visit [the example file](/example.rb) with examples to call the API in a single
324
324
  - Ensure your Meta App uses an API version greater than or equal to `v.14`.
325
325
  - Ensure that the Panel in the Facebook dashboard doesn't display any error.
326
326
 
327
+ Note: Sometimes the messages are delayed, see [Meta documentation](https://developers.facebook.com/docs/whatsapp/on-premises/guides/send-message-performance#delays).
328
+
327
329
  ## Development
328
330
 
329
331
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests.
330
332
 
331
333
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
332
334
 
333
- ## Contributing
334
-
335
- Bug reports and pull requests are welcome on GitHub at [https://github.com/ignacio-chiazzo/ruby_whatsapp_sdk](https://github.com/ignacio-chiazzo/ruby_whatsapp_sdk) This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
336
-
337
335
  ### Run all the tests
338
336
  - **Unit tests:** Run `rake test`
339
337
  - **Sorbet Typecheck:** run `srb tc`
340
338
  - **Linters:** `bundle exec rubocop`
341
339
 
340
+ ## Contributing
341
+
342
+ Bug reports and pull requests are welcome on GitHub at [https://github.com/ignacio-chiazzo/ruby_whatsapp_sdk](https://github.com/ignacio-chiazzo/ruby_whatsapp_sdk) This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
343
+
344
+ If you want a feature to be implemented in the gem, please, open an issue and we will take a look as soon as we can.
345
+
342
346
  ## License
343
347
 
344
348
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/example.rb CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # frozen_string_literal: true
3
2
 
4
3
  # 1) Copy this code into a file and save it `example.rb`
@@ -12,7 +11,7 @@ gemfile(true) do
12
11
 
13
12
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
14
13
 
15
- gem "whatsapp_sdk", path: "/Users/ignaciochiazzo/src/whatsapp_sdk" # "~> 0.5.0"
14
+ gem "whatsapp_sdk"
16
15
  gem "pry"
17
16
  gem "pry-nav"
18
17
  end
@@ -22,12 +21,12 @@ require "pry"
22
21
  require "pry-nav"
23
22
 
24
23
  ################# UPDATE CONSTANTS #################
25
- ACCESS_TOKEN = "EAAZAvvr0DZBs0BAHyg1bIPxEVV8dfI6woMaCxGNdjEEWYbZAkrMDuSqJcwXuIX10AmUW5TQLMEQCHM07dYzpGW5rTbZCZAoDt0aixPyZBB2nKFCTGhd3OnyZCZCzAxEdZBbZC4IY9uYkYbC9KCSLfOpAdgBU1dLGCTR2brwAvpWZAosgjXwgQZBLwrOSEpblsMVTGDkNaxAbi8zZBLijYRi6gsaSK" # replace this with a valid access_token # TODO replace
26
- BUSINESS_ID = 102261539298487
27
- SENDER_ID = 111591145018464
28
- RECIPIENT_NUMBER = 13437772910
29
24
 
30
- IMAGE_LINK = "https://ignaciochiazzo.com/static/4c403819b9750c8ad8b20a75308f2a8a/876d5/profile-pic.avif"
25
+ ACCESS_TOKEN = "<TODO replace>"
26
+ SENDER_ID = "<TODO replace>"
27
+ RECIPIENT_NUMBER = "<TODO replace>"
28
+ BUSINESS_ID = "<TODO replace>"
29
+ IMAGE_LINK = "<TODO replace>"
31
30
 
32
31
  ################# Initialize Client #################
33
32
  WhatsappSdk.configure do |config|
@@ -47,7 +46,6 @@ end
47
46
  medias_api = WhatsappSdk::Api::Medias.new
48
47
  messages_api = WhatsappSdk::Api::Messages.new
49
48
  phone_numbers_api = WhatsappSdk::Api::PhoneNumbers.new
50
- binding.pry
51
49
 
52
50
  ############################## Phone Numbers API ##############################
53
51
  registered_number = phone_numbers_api.registered_number(SENDER_ID)
@@ -90,7 +88,7 @@ print_message_sent(location_sent)
90
88
  ######### SEND AN IMAGE
91
89
  # Send an image with a link
92
90
  image_sent = messages_api.send_image(
93
- sender_id: SENDER_ID, recipient_number: RECIPIENT_NUMBER, link: media.url, caption: "Testing"
91
+ sender_id: SENDER_ID, recipient_number: RECIPIENT_NUMBER, link: media.url, caption: "Ignacio Chiazzo Profile"
94
92
  )
95
93
  print_message_sent(image_sent)
96
94
 
@@ -2,7 +2,5 @@
2
2
  # typed: strict
3
3
 
4
4
  module WhatsappSdk
5
- class Version
6
- VERSION = "0.5.1"
7
- end
5
+ VERSION = "0.6.0"
8
6
  end
data/whatsapp_sdk.gemspec CHANGED
@@ -8,7 +8,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
8
8
 
9
9
  Gem::Specification.new do |spec|
10
10
  spec.name = "whatsapp_sdk"
11
- spec.version = WhatsappSdk::Version::VERSION
11
+ spec.version = WhatsappSdk::VERSION
12
12
  spec.authors = ["ignacio-chiazzo"]
13
13
  spec.email = ["ignaciochiazzo@gmail.com"]
14
14
  spec.summary = "Use the Ruby Whatsapp SDK to comunicate with Whatsapp API using the Cloud API"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whatsapp_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ignacio-chiazzo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-17 00:00:00.000000000 Z
11
+ date: 2022-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  - !ruby/object:Gem::Version
244
244
  version: '0'
245
245
  requirements: []
246
- rubygems_version: 3.2.3
246
+ rubygems_version: 3.3.3
247
247
  signing_key:
248
248
  specification_version: 4
249
249
  summary: Use the Ruby Whatsapp SDK to comunicate with Whatsapp API using the Cloud