cloud-waba-ruby-client 0.0.10 → 0.0.11

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: a3d125f451cbb03e1d00d4c15d93cb802da482df91e857bf20cadfd801bd474b
4
- data.tar.gz: 55897f67d56ac2816c3142298a7d9d6eb019b43e456003e5793499e4c64eb57c
3
+ metadata.gz: 7c32ce1f9c66abdbd0041387f44c9f03d4ec45e78a1a036d7f7d4fc67e3364d1
4
+ data.tar.gz: 2a79b18d714a9d4560cb51aa45b107dc7e8d1322ee44689a4c666603d480dfcb
5
5
  SHA512:
6
- metadata.gz: 3d491775dd33e6dea8b68180fadef122d7a737dd9ed608b684e40c0a6c27b7b3118a1f9dbebac52ce60b0ad4a30028ae86ca6cd0cb9ef4dcd6a63f81878de4f3
7
- data.tar.gz: a37edb100cfe734f21d4e6a98be23f5014e9b1d59f8c1ed3ef6621e73194043087b8dbcf752b9a5351ea7eb3fb0050abb9de3eafa9a295ff1af520e3d49dbb98
6
+ metadata.gz: ce5dbb10ddf98d348b817bf5c7c7c2bbf92b8b46885e2c0426c28b9ba5bee5a80494127fad277aec4c5241abe74fe7570ba7beea70971decf999c0eaafd1f1f1
7
+ data.tar.gz: 43271b7d29dcadda0fb7662360a610a6c4c68e98b6c31fee6506e950f4a1c819b1432ef12b57d7e9a431095504e369cf2a50005471314a0e4eda0b147d31a05a
data/README.md CHANGED
@@ -30,7 +30,8 @@ gem install cloud-waba-ruby-client
30
30
  - Meta developer app
31
31
  ### Initiating clients using parameters
32
32
  ```ruby
33
- require "cloud_waba/client"
33
+ require "cloud_waba" # Auto-loads the entire gem
34
+
34
35
  client_1 = CloudWaba::Client.new(
35
36
  app_id: param_app_id_1,
36
37
  app_secret: param_app_secret_1,
@@ -64,13 +65,13 @@ Add following environment variables to your `.env` file:
64
65
  ```
65
66
  Fill credentials for your meta developer app, business account and phone number ids.
66
67
  ```ruby
67
- require "cloud_waba/client"
68
+ require "cloud_waba"
68
69
  client = CloudWaba::Client.new # If no params provided, configuration will fallback to env variables
69
70
  ```
70
71
  ## Usage
71
72
  ### Sending template message
72
73
  ```ruby
73
- require "cloud_waba/client"
74
+ require "cloud_waba"
74
75
 
75
76
  client = CloudWaba::Client.new
76
77
  client.messages.send_template(recipient: "+201XXXXXXXXX", template_name: "hello_world", template_lang: "en_US", components: [])
@@ -78,7 +79,7 @@ client.messages.send_template(recipient: "+201XXXXXXXXX", template_name: "hello_
78
79
 
79
80
  ### Sending text message
80
81
  ```ruby
81
- require "cloud_waba/client"
82
+ require "cloud_waba"
82
83
 
83
84
  client = CloudWaba::Client.new
84
85
  client.messages.send_text(body: "Hello World!", recipient: "+201XXXXXXXXX")
@@ -86,7 +87,7 @@ client.messages.send_text(body: "Hello World!", recipient: "+201XXXXXXXXX")
86
87
 
87
88
  ### Sending image message
88
89
  ```ruby
89
- require "cloud_waba/client"
90
+ require "cloud_waba"
90
91
 
91
92
  client = CloudWaba::Client.new
92
93
  client.messages.send_image(caption: "Nice caption for image!", link: "https://picsum.photos/200/300",recipient: "+201XXXXXXXXX")
@@ -94,7 +95,7 @@ client.messages.send_image(caption: "Nice caption for image!", link: "https://pi
94
95
 
95
96
  ### Sending audio message
96
97
  ```ruby
97
- require "cloud_waba/client"
98
+ require "cloud_waba"
98
99
 
99
100
  client = CloudWaba::Client.new
100
101
  client.messages.send_audio(link: "https://samplelib.com/lib/preview/mp3/sample-3s.mp3",recipient: "+201XXXXXXXXX")
@@ -102,7 +103,7 @@ client.messages.send_audio(link: "https://samplelib.com/lib/preview/mp3/sample-3
102
103
 
103
104
  ### Sending video message
104
105
  ```ruby
105
- require "cloud_waba/client"
106
+ require "cloud_waba"
106
107
 
107
108
  client = CloudWaba::Client.new
108
109
  client.messages.send_video(caption: "Nice caption for video!", link: "https://samplelib.com/lib/preview/mp4/sample-5s.mp4",recipient: "+201XXXXXXXXX")
@@ -110,7 +111,7 @@ client.messages.send_video(caption: "Nice caption for video!", link: "https://sa
110
111
 
111
112
  ### Sending document message
112
113
  ```ruby
113
- require "cloud_waba/client"
114
+ require "cloud_waba"
114
115
 
115
116
  client = CloudWaba::Client.new
116
117
  client.messages.send_document(caption: "Nice caption for doc!", link: "https://download.samplelib.com/xls/sample-empty.xls",recipient: "+201XXXXXXXXX")
@@ -118,7 +119,7 @@ client.messages.send_document(caption: "Nice caption for doc!", link: "https://d
118
119
 
119
120
  ### Sending location message
120
121
  ```ruby
121
- require "cloud_waba/client"
122
+ require "cloud_waba"
122
123
 
123
124
  client = CloudWaba::Client.new
124
125
  client.messages.send_location(longitude: 30.0849643, latitude: 31.2913638, name: "Cairo University", address: "1 شارع الجامعة, Giza Governorate 12613", recipient: "+201XXXXXXXXX")
@@ -126,7 +127,7 @@ client.messages.send_location(longitude: 30.0849643, latitude: 31.2913638, name:
126
127
 
127
128
  ### Sending contact message
128
129
  ```ruby
129
- require "cloud_waba/client"
130
+ require "cloud_waba"
130
131
 
131
132
  client = CloudWaba::Client.new
132
133
  name = ::CloudWaba::Models::Messages::ContactName.new(formatted_name: "Ahmed Ali", first_name: "Ashley")
@@ -137,7 +138,7 @@ client.messages.send_contact(contacts: contacts,recipient: "+201XXXXXXXXX")
137
138
 
138
139
  ### Sending reaction on a message
139
140
  ```ruby
140
- require "cloud_waba/client"
141
+ require "cloud_waba"
141
142
 
142
143
  client = CloudWaba::Client.new
143
144
  client.messages.send_reaction(recipient: "+201XXXXXXXXX", emoji: "💙", reply_message_id: "wamid.HBgMMjAxMjAxMzIyMzMxFQIAEZgSQTU5QkExMUUyQlRCNTU1NTVEAA==")
@@ -152,13 +153,13 @@ client = CloudWaba::Client.new
152
153
 
153
154
  ### Listing templates
154
155
  ```ruby
155
- require "cloud_waba/client"
156
+ require "cloud_waba"
156
157
  client = CloudWaba::Client.new
157
158
  client.templates.list(limit: 5)
158
159
  ```
159
160
  ### Creating a template
160
161
  ```ruby
161
- require "cloud_waba/client"
162
+ require "cloud_waba"
162
163
 
163
164
  client = CloudWaba::Client.new
164
165
  client.templates.create(name: "welcome", category: ::CloudWaba::Models::Enums::Templates::Category::Utility, language: "en", components: [::CloudWaba::Models::Templates::BodyComponent.new(text: "Welcome to our store!, how can we help?")])
@@ -166,7 +167,7 @@ client.templates.create(name: "welcome", category: ::CloudWaba::Models::Enums::T
166
167
 
167
168
  ### Creating a template with header, body and footer components with variables
168
169
  ```ruby
169
- require "cloud_waba/client"
170
+ require "cloud_waba"
170
171
 
171
172
  client = CloudWaba::Client.new
172
173
  category = ::CloudWaba::Models::Enums::Templates::Category::Marketing
@@ -1,12 +1,13 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cloud-waba-ruby-client"
3
- s.version = "0.0.10"
3
+ s.version = "0.0.11"
4
4
  s.summary = "Cloud Waba Client for Ruby."
5
5
  s.description = "A simple API wrapper for Cloud Whatsapp Business API"
6
6
  s.authors = ["Ahmed Bassell"]
7
7
  s.email = "ahmedbassell@gmail.com"
8
8
  # s.platform = Gem::Platform::RUBY
9
9
  s.files = `git ls-files`.split("\n")
10
+ s.require_paths = ["lib"]
10
11
  s.homepage =
11
12
  "https://rubygems.org/gems/cloud_waba"
12
13
  s.license = "MIT"
data/lib/cloud_waba.rb ADDED
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+
6
+ # Main entry point for the CloudWaba gem
7
+ # This file should be required to load the entire gem
8
+
9
+ require_relative "cloud_waba/client"
@@ -0,0 +1,10 @@
1
+ {
2
+ "systemParams": "darwin-x64-83",
3
+ "modulesFolders": [],
4
+ "flags": [],
5
+ "linkedModules": [],
6
+ "topLevelPatterns": [],
7
+ "lockfileEntries": {},
8
+ "files": [],
9
+ "artifacts": {}
10
+ }
data/yarn.lock ADDED
@@ -0,0 +1,4 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud-waba-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Bassell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-15 00:00:00.000000000 Z
11
+ date: 2025-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -111,6 +111,7 @@ files:
111
111
  - cloud-waba-ruby-client.gemspec
112
112
  - lib/api/messages/service.rb
113
113
  - lib/api/templates/service.rb
114
+ - lib/cloud_waba.rb
114
115
  - lib/cloud_waba/client.rb
115
116
  - lib/cloud_waba/errors/bad_request.rb
116
117
  - lib/cloud_waba/errors/missing_parameter.rb
@@ -147,8 +148,10 @@ files:
147
148
  - lib/cloud_waba/models/templates/message_template.rb
148
149
  - lib/cloud_waba/models/templates/response.rb
149
150
  - lib/cloud_waba/utils.rb
151
+ - node_modules/.yarn-integrity
150
152
  - spec/cloud_waba/client_spec.rb
151
153
  - spec/spec_helper.rb
154
+ - yarn.lock
152
155
  homepage: https://rubygems.org/gems/cloud_waba
153
156
  licenses:
154
157
  - MIT