Skip to content

Commit d6b10fe

Browse files
authored
Merge pull request #57 from Vonage-Community/add_whatsapp_inbound
Added inbound WhatsApp functionality and added some logic to make the…
2 parents c6f7524 + a7cd37d commit d6b10fe

19 files changed

+987
-141
lines changed

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Vonage APIs Quickstart Examples for Ruby on Rails
2-
2+
<br>
33
The purpose of the quickstart guide is to provide simple examples focused on one goal. For example, sending an SMS, making a Text to Speech call, or sending an image in WhatsApp.
44

55
## Configure with Your Vonage API Keys
6-
6+
<br>
77
To use this sample you will first need a [Vonage account](https://dashboard.nexmo.com/sign-up). Once you have your own API credentials, rename the `.env.example` file to `.env` and set the values as required.
88

99
For some of the examples you will need to [buy a number](https://dashboard.nexmo.com/buy-numbers).
1010

1111
## Setup
12-
12+
<br>
1313
```
1414
git clone [email protected]:Vonage-Community/sample-messages-ruby_on_rails-quickstart.git
1515
cd sample-messages-ruby_on_rails-quickstart
@@ -18,46 +18,44 @@ bundle install
1818
rails db:create db:migrate
1919
rails s
2020
```
21-
2221
## Tutorials & Sample Code
23-
2422
### SMS
25-
23+
<br>
2624
Tutorial | Code Sample
2725
--------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------
2826
[How to Send SMS Messages with Ruby on Rails](https://developer.vonage.com/en/blog/send-sms-ruby-on-rails-dr) | [outbound_sms_controller.rb](app/controllers/outbound_sms_controller.rb)
2927
[Receive an SMS Message Status with Ruby on Rails](#) | [sms_message_status_controller.rb](app/controllers/sms_message_status_controller.rb)
3028
[How to Receive SMS Messages with Ruby on Rails](https://developer.vonage.com/en/blog/receive-sms-messages-ruby-on-rails-dr) | [inbound_sms_controller.rb](app/controllers/inbound_sms_controller.rb)
3129

3230
### Voice
33-
31+
<br>
3432
Tutorial | Code Sample
3533
------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------
3634
[How to Make an Outbound Text-to-Speech Phone Call with Rails](#) | [outbound_calls_controller.rb](app/controllers/outbound_calls_controller.rb)
3735
[How to receive an Call Event webhook with Ruby on Rails](#) | [call_events_controller.rb](app/controllers/call_events_controller.rb)
3836
[How to Handle Inbound Phone Calls with Ruby on Rails](#) | [inbound_calls_controller.rb](app/controllers/inbound_calls_controller.rb)
3937

4038
### RCS
41-
39+
<br>
4240
Tutorial | Code Sample
4341
--------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------
4442
[How to Send RCS Suggested Reply Messages with Ruby on Rails](#) | [outbound_rcs_controller.rb](app/controllers/outbound_rcs_controller.rb)
4543
[Receive an RCS Message Status with Ruby on Rails](#) | [rcs_message_status_controller.rb](app/controllers/rcs_message_status_controller.rb)
4644
[How to Receive RCS Reply Messages with Ruby on Rails](#) | [inbound_rcs_controller.rb](app/controllers/inbound_rcs_controller.rb)
4745

4846
### WhatsApp
49-
47+
<br>
5048
Tutorial | Code Sample
5149
--------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------
5250
[How to Send WhatsApp Messages with Ruby on Rails](#) | [outbound_whatsapp_controller.rb](app/controllers/outbound_whatsapp_controller.rb)
53-
[How to Receive WhatsApp Messages with Ruby on Rails](#) | [#](#)
51+
[How to Receive WhatsApp Messages with Ruby on Rails](#) | [inbound_whatsapp_controller.rb](app/controllers/inbound_whatsapp_controller.rb)
5452

5553
## Request More Examples
56-
54+
<br>
5755
For help with the code or to request an example not listed here, please join the [Vonage Community Slack](https://developer.vonage.com/en/community/slack). Feedback and requests are highly appreciated!
5856

5957
## Licenses
60-
58+
<br>
6159
- The code samples in this repo is under [MIT](LICENSE)
6260

6361
- The tutorials contents are under Creative Commons, [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/legalcode)

WHATSAPP_SETUP.md

Lines changed: 0 additions & 127 deletions
This file was deleted.

app/assets/stylesheets/home.css

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
/* README container */
2+
.readme-container {
3+
max-width: 1000px;
4+
margin: 0 auto;
5+
padding: 40px 20px;
6+
background-color: #ffffff;
7+
min-height: 100vh;
8+
}
9+
10+
.readme-content {
11+
background: white;
12+
padding: 40px;
13+
border-radius: 8px;
14+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
15+
}
16+
17+
/* Markdown styling */
18+
.markdown-body {
19+
font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
20+
font-size: 16px;
21+
line-height: 1.6;
22+
color: #333;
23+
}
24+
25+
.markdown-body h1 {
26+
font-family: 'Montserrat', sans-serif;
27+
font-size: 32px;
28+
font-weight: 600;
29+
color: #000;
30+
margin: 0 0 24px 0;
31+
padding-bottom: 16px;
32+
border-bottom: 2px solid #871FFF;
33+
}
34+
35+
.markdown-body h2 {
36+
font-family: 'Montserrat', sans-serif;
37+
font-size: 24px;
38+
font-weight: 600;
39+
color: #333;
40+
margin: 32px 0 16px 0;
41+
padding-bottom: 8px;
42+
border-bottom: 1px solid #e5e5e5;
43+
}
44+
45+
.markdown-body h3 {
46+
font-family: 'Montserrat', sans-serif;
47+
font-size: 20px;
48+
font-weight: 600;
49+
color: #333;
50+
margin: 24px 0 12px 0;
51+
}
52+
53+
.markdown-body p {
54+
margin: 0 0 16px 0;
55+
line-height: 1.7;
56+
}
57+
58+
.markdown-body a {
59+
color: #871FFF;
60+
text-decoration: none;
61+
font-weight: 500;
62+
transition: color 0.2s;
63+
}
64+
65+
.markdown-body a:hover {
66+
color: #6a19cc;
67+
text-decoration: underline;
68+
}
69+
70+
.markdown-body code {
71+
background-color: #f5f5f5;
72+
padding: 2px 6px;
73+
border-radius: 3px;
74+
font-family: 'Roboto Mono', monospace;
75+
font-size: 14px;
76+
color: #871FFF;
77+
}
78+
79+
.markdown-body pre {
80+
background-color: #f5f5f5;
81+
padding: 16px;
82+
border-radius: 6px;
83+
overflow-x: auto;
84+
margin: 16px 0;
85+
border: 1px solid #e5e5e5;
86+
}
87+
88+
.markdown-body pre code {
89+
background-color: transparent;
90+
padding: 0;
91+
color: #333;
92+
font-size: 13px;
93+
line-height: 1.5;
94+
}
95+
96+
.markdown-body ul,
97+
.markdown-body ol {
98+
margin: 0 0 16px 0;
99+
padding-left: 24px;
100+
}
101+
102+
.markdown-body li {
103+
margin: 8px 0;
104+
line-height: 1.6;
105+
}
106+
107+
.markdown-body table {
108+
width: 100%;
109+
border-collapse: collapse;
110+
margin: 16px 0;
111+
font-size: 14px;
112+
}
113+
114+
.markdown-body table th {
115+
background: linear-gradient(135deg, #871FFF 0%, #FFA68C 100%);
116+
color: white;
117+
padding: 12px;
118+
text-align: left;
119+
font-weight: 600;
120+
font-family: 'Montserrat', sans-serif;
121+
}
122+
123+
.markdown-body table td {
124+
padding: 12px;
125+
border-bottom: 1px solid #e5e5e5;
126+
}
127+
128+
.markdown-body table tr:hover {
129+
background-color: #fafafa;
130+
}
131+
132+
.markdown-body strong {
133+
font-weight: 600;
134+
color: #000;
135+
}
136+
137+
.markdown-body hr {
138+
border: none;
139+
border-top: 1px solid #e5e5e5;
140+
margin: 32px 0;
141+
}

0 commit comments

Comments
 (0)