Coder Social home page Coder Social logo

alexa-lolstats-skill's Introduction

No longer maintained

[DEPRECATED] This repository is no longer maintained

While this project is fully functional, the dependencies are no longer up to date. You are still welcome to explore, learn, and use the code provided here.

Modus is dedicated to supporting the community with innovative ideas, best-practice patterns, and inspiring open source solutions. Check out the latest Modus Labs projects.

Modus Labs


Alexa Custom Skill: League of Legends Stat Finder

NOTICE: this project is still in development and has limited functionality

This repo contains the Intents, Sample Utterances, and Lambda functions to set up a custom skill for Amazon Echo using AWS Lambda and Node JS, that returns stat information for League of Legend players.

Current functionality:

  • Get summoner's rank
  • Get summoner's most played Champion in the last 10 Normal Games

Setup for Lambda function:

  1. Once you've cloned the repository, from the root folder do:
npm install

This will install the packages isomorphic-fetch and es6-promise. The first is just a simple plugin we use to get API calls and return them as JSON and the second polyfills our es6 promises.

  1. Open up the index.js file. There are 3 fields that need to be filled in.
  • var API_BASE = "<your_riot_api_key> - the string value should be replaced with your personal developer API KEY from your developer account with Riot. If you don't have one, start here Riot Developer Site
  • var SUMMONER_ID = "<your_summoner_id> - the string value should be replaced with your personal summoner ID. This can also be found on the Riot Developer Site by logging into your account and clicking the 'My Account' link in the top right corner.
  • event.session.application.applicationId != "<your_app_id>" - the string value should be replaced with your Alexa Skill application ID. This is generated when you create a new Alexa Skill from Amazon's Developer Site. If you have no idea how to do this, I would encourage you to check out @simonprickett 's Guide to building custom Alexa Skills here
  1. Once all this has been done, zip up the index.js, package.json, and node_modules files.
    Important: zip the files, and not the directory they live in.

  2. Upload your function zip file to AWS Lambda. Guide for that can be found here Create a NodeJS Package for AWS Lambda

  3. Once the function is created in AWS, grab the ARN from the top right corner of the AWS Lambda Browser UI

  4. When prompted in your Alexa Skill creation process, enter the ARN into the appropriate text field Screenshot

Wrap Up

And that's it! your function is added to the skill and you can begin testing your skill in the Alexa console. Again, if you need help with this, I advise you check out Simon's blog post above.

-- shoutout to @simonprickett for help with troubleshooting and being the inspiration for the project in the first place. Shoutout to @dmackerman for tips on handling API requests.

alexa-lolstats-skill's People

Contributors

ecris87 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.