Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Get The Latest NBA News Sent to Your Phone via SMS

Blog post from Twilio

Post Details
Company
Date Published
Author
Anthony Dellavecchia
Word Count
1,912
Language
English
Hacker News Points
-
Summary

The article provides a step-by-step guide on how to write a Python application that texts NBA news using the Twilio and SportsDataIO APIs. The application first sets up a local development environment, installs dependencies, and registers for a free account with SportsDataIO. It then uses an API from SportsDataIO to retrieve NBA news data, filters it to get only "Top-Headlines" news, and stores the API key in environment variables. The application also creates functions to send outbound SMS messages containing the retrieved news and make inbound SMS requests that trigger the application. Finally, the article provides a Flask web framework implementation of the application, which uses ngrok to expose the local server to the public internet, allowing it to receive inbound SMS requests and respond with NBA news.