The intention of this project was to get familiar with the Twilio API, Sinatra, and Ruby language. Also, it was to learn how to add endpoints of other APIs into a chatbot and iterate on the chatbot's personality to make it more fun to talk with, or more human-like.
It is a simple chatbot that can answer questions about myself, including who, where, when, and why, with some additional functions embedded. It is like my personal assistant, though it is a bit stupid at this time but would try to answer questions from others, or provide some fun stuff as some surprise. At some point, it would send my information to the user's email box (Not built yet). (Because my phone carrier cannot receive MMS, so I only searched for APIs with text responses.)
I built this chatbot based on the skills we learned from weekly training using Sinatra and Heroku. I then searched for APIs that can be added to this project, during which I found many APIs were not working, for example, due to damaged json files. I finally chose two simple APIs and added them in the the SMS conditional statements. I added the endpoints using HTTParty. I finally changed the script according to the personality I wanted it to have.
The bot can answer some basic questions about me, and can also get some random joke from Chuck Norris, or get a quote on design from a quote API. In the future, it might help me to send some predefined emails.
I learned how to add APIs and especially the process to choose a working API - try the online testing first! For future iteration, I wish I could utilize the API from Sendgrid, which I added in email endpoint this time, but I hope it could incorporate with Twilio to send emails using SMS.