#LoLChaMa A twitter bot to tweet a summoner's top 3 champion masteries of League of Legends (LoL) on your timeline periodically.
I created this to learn Amazon Web Service(AWS) and Riot API. And I wanted to create a software at no cost. So I uses AWS Lamda to create this. And I use CloudWatdh to run Lamda function periodically. Lamda and CloudWatdh have monthly free tier usage. It's enough to run a simple bot.
And why Twitter bot? Because I didn't want to use an additional web hosting service at that time. However, AWS has a Simple Storage Service(S3) that can be a web server and has free tier usage for 12 monthes. But I wanted to run the bot long time over 12 monthes. So I chose Twitter for an output page.
Architecture is CloudWatch > Lambda > Twitter.
An entry for "[The Riot Games API Challenge 2016 (4/22 - 5/9)] (https://developer.riotgames.com/discussion/announcements/show/eoq3tZd1)" - "3. Creativity/Originality" category.
The name "LoLChama" came from LoL Champion Mastery.
- Node.js v4.4.3 (npm 2.15.1)
- Summoner Name of League of Legends
- Riot API Key
- Twitter Consumer Key (API Key)
- Twitter Consumer Secret (API Secret)
- Twitter Access Token
- Twitter Access Token Secret
- AWS Account
- AWS IAM user for Lamda
1. Download LoLChaMa source
3. Install Node packages
Open Command Prompt and Type these.
Move to the download folder. (D:\ulg\Downloads\LoLChaMa-master)
d: cd D:\ulg\Downloads\LoLChaMa-master
Install Node packages.
npm install async npm install twitter npm install riot-api-client
4. Create a zip
5. Create a Lambda function
Go to AWS Lambda page.
Click "Create a Lambda function".
7. Add event source
Event source type : CloudWatch Event - Schedule
Rule name : LoLChaMa
Schedule expression : cron(0 6 * * ? *)
exp.) Run every 6:00 am (UTC). Schedule Expression Syntax for Rules
(c) 2016. LoLChaMa isn’t endorsed by Riot Games and doesn’t reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.