Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/instructure/canvas-alexa-lambda
Instructure's Alexa lambda interface for Canvas-LMS
https://github.com/instructure/canvas-alexa-lambda
Last synced: 7 days ago
JSON representation
Instructure's Alexa lambda interface for Canvas-LMS
- Host: GitHub
- URL: https://github.com/instructure/canvas-alexa-lambda
- Owner: instructure
- License: agpl-3.0
- Created: 2018-07-27T20:56:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T01:01:25.000Z (over 1 year ago)
- Last Synced: 2024-04-14T20:25:48.808Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.37 MB
- Stars: 12
- Watchers: 13
- Forks: 5
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Canvas Alexa Lambda
[Canvas](https://github.com/instructure/canvas-lms) 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](https://github.com/instructure/canvas-lms) locally. This process will help you keep the default host in the `.lambda-dev-example`.
Then, visit your users settings (`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 `*local*
`yarn`
`./bin/devScript.sh `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: ' You must be crazy. Anything else? ' },
reprompt: { outputSpeech: [Object] } },
sessionAttributes: 'mock session attributes' }
```### Prerequisites
You will either need:
[Docker](https://www.docker.com/)
or
[Node](https://nodejs.org/en/) v10.22.0.
You can use npm if you would like; however, we use [Yarn](https://yarnpkg.com/lang/en/) 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
* [Alexa-AWS-SDK](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs) - The library to handle intents
* [Node](https://nodejs.org/en/) - javascript engine## Contributing
Please read [CONTRIBUTING.md](https://github.com/instructure/canvas-alexa-lambda/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).
## Authors
* **Steven Burnett** - *Initial work* - [sdb1228](https://github.com/sdb1228)
* **Landon Gilbert-Bland** - *Initial work* - [vimalloc](https://github.com/vimalloc)See also the list of [contributors](https://github.com/instructure/canvas-alexa-lambda/graphs/contributors) who participated in this project.
## License
This project is licensed under the GNU AFFERO GENERAL PUBLIC License - see the [LICENSE](LICENSE) file for details.