GithubHelp home page GithubHelp logo

isabella232 / canvas-alexa-lambda Goto Github PK

View Code? Open in Web Editor NEW

This project forked from instructure/canvas-alexa-lambda

0.0 0.0 0.0 1.07 MB

Instructure's Alexa lambda interface for Canvas-LMS

License: GNU Affero General Public License v3.0

Shell 4.10% JavaScript 95.62% Dockerfile 0.28%

canvas-alexa-lambda's Introduction

Canvas Alexa Lambda

Canvas Alexa Lambda is the lambda function that runs all intents present in the Canvas-LMS Alexa Skill.

Getting Started

To get started, set up your .lambda-dev file. The .lambda-dev-example file includes a basic setup; however, you will still need to get your own access key for the host you are running against. For the best local development experience (and the easiest to track requests/problems), clone and run Canvas-lms locally. This process will help you keep the default host in the .lambda-dev-example. Then, visit your users settings (<host>profile/settings) to create an access token and paste it into the .lambda-dev file.

After that you should be able to run the devScript.sh with the intent you would like to test. A list of possible intents can be found in intents.json:

Docker

docker build -t alexalambda . docker run -it --rm alexalambda ./bin/devScript.sh <intentName>

local

yarn ./bin/devScript.sh <intentName>

The script will run the lambda with some dummy session and context data and return the output of your intent in the saml field.

example:

$ ./bin/devScript.sh GetBlackboard
response for Intent: GetBlackboard
{ version: '1.0',
  response:
   { shouldEndSession: false,
     outputSpeech:
      { type: 'SSML',
        ssml: '<speak> You must be crazy. Anything else? </speak>' },
     reprompt: { outputSpeech: [Object] } },
  sessionAttributes: 'mock session attributes' }

Prerequisites

You will either need:

Docker

or

Node v10.22.0.

You can use npm if you would like; however, we use Yarn for this project.

Running the tests

We use jest for testing the canvas alexa lambda:

Docker

docker run alexalambda yarn test

local

yarn test

And coding style tests

We use prettier in this project. Once you are comfortable with your intent or change you can run:

yarn lint

This will auto format your code to our prettier standard.

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Steven Burnett - Initial work - sdb1228
  • Landon Gilbert-Bland - Initial work - vimalloc

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU AFFERO GENERAL PUBLIC License - see the LICENSE file for details.

canvas-alexa-lambda's People

Contributors

sdb1228 avatar spencerolson avatar aaronkchsu avatar brianlwatson avatar davishyer avatar mlemon-instructure 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.