See more about Codechella here (Twitter) and here (Devpost).
- Jonathan Bartlett (GitHub | Twitter)
- Akhil Nair (GitHub | Twitter)
- Abel Fikreyohanes (GitHub | Twitter)
- Shivam Soni (GitHub | Twitter)
- Shreehari Vaasistha (GitHub | Twitter)
After brainstorming ideas, we decided unanimously on a Smart Assistant application that would allow users to interact with Twitter in a meaningful way. Current offerings for Twitter "skills" on Amazon Alexa are limited in what they can do and are rated poorly on the store.
Therefore we decide to create a skill, and the supporting API, to allow users to do the following:
- Get a summary of tweets in a Hashtag
- Get the latest tweets from a User
- Follow a user
- Get the topics trending in your area
We are using the Twitter API v2 to:
- Get Tweets based on a Hashtag
- Get Tweets from a user
- Follow a user
- Get trending topics
This smart assistant application will hopefully open up Twitter to a whole new demographic. People with visual impairments may struggle when using Twitter on a conventional mobile app or website. A smart assistant allows users to interact with Twitter purely through voice and we wanted to implement features we feel are key to the Twitter experience.
.
+-- .gitignore # Ignore secrets, venv, lock files etc
+-- README.md
+-- requirements.txt # Project Requirements
+-- lambda
| +-- lambda-function.py # Handler for lambda functions
| +-- twitter_functions.py # Helper functions for interacting with twitter API
| +-- tweet_summary.py # Tweet summarizer
+-- interactionModels
| +-- custom
| | +-- en-US.json # Interaction model for the Alex Skill
| Name | Value |
|---|---|
| API_KEY | The Twitter API Key for the project |
| API_SECRET | The Twitter API Secret for the project |
| ACCESS_TOKEN | The Twitter App Access Token for the project |
| ACESSS_TOKEN_SECRET | The Twitter App Access Token Secret for the project |
A sample environment file exists at .env.sample you should source this file
when running the serverless deployment.
- Create a new Alexa Skill from the Alexa Skills Dashboard
- Make sure to choose the option to provision your own!
- Copy the interactModel json in the json editor on the Alexa Skills Dashboard
- Build the model
- Source your environment file with the required environment variables
- Make sure you have serverless installed and aws credentials configured
- Run
npm installto install serverless plugins - Run
serverless deployto deploy the lambda function
- Copy the ARN for the twitter digest lambda function
- Paste the ARN into the Endpoints field on the Alexa Skills Dashboard
- Enjoy!