[x] 3: Return the url with a personalized message in the body of the request formatted like
We guessed you're part of this generation: [insert generation]! Happy listening! [song link]`
[x] 4: Commit your updated code to song4u/index.js in the song4u branch, and only merge the pull request when the bot approves your changes!
🚧 Test Your Work
To test your work, try texting a jpg image to your Twilio number (with a face!). You should receive a text back that contains the required message format.
Example:
Sent from your Twilio trial account - We guessed you're part of this generation: GenZ! Happy listening! https://open.spotify.com/track/0SIAFU49FFHwR3QnT5Jx0k?si=1c12067c9f2b4fbf
Working with JSON
JSON has keys and values. In our case, the generation is the key, and the url is the value.
See if you can determine the url with this syntax:
let value = json_object[key]
Shortcuts with Strings
You might be used to concatenating strings and variables like this:
Week 2 Step 8 ⬤⬤⬤⬤⬤⬤⬤⬤ | 🕐 Estimated completion: 5-10 minutes
Ok, Boomer :neutral_face:
✅ Task:
Modify your Azure Function so that it texts the user back with a song.
${}
to quickly insert stringssong4u/index.js
in thesong4u
branch, and only merge the pull request when the bot approves your changes!🚧 Test Your Work
To test your work, try texting a jpg image to your Twilio number (with a face!). You should receive a text back that contains the required message format.
Example:
Working with JSON
JSON has keys and values. In our case, the generation is the key, and the url is the value.
See if you can determine the url with this syntax:
Shortcuts with Strings
You might be used to concatenating strings and variables like this:
That can get tiring, though. Try this syntax:
📹 Walkthrough Video