Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

echohub-alexa-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echohub-alexa-sdk

EchoHub Alexa Skill Lambda SDK

  • 1.0.3
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

EchoHub Alexa Lambda SDK

This library is intended to be used when writing an Alexa Skill targeted at EchoHub users.

Installation

yarn add echohub-alexa-sdk

Usage

The SDK currently assumes you are using Alexa Skills Kit for NodeJS

import EchoHubAlexaSDK from 'echohub-alexa-sdk';

const echohub = new EchoHubAlexaSDK();

const languageStrings = {
  'en-US': {
    translation: {
      HELLO: 'Hi! Welcome to my cool skill using EchoHub'
      TIME: 'The time is {{time}}'
    },
  },
};

const handlers = {
  TimeIntent() {
    args = {
      a: 1.
    }

    echohub.execute('mycommand', args).then((response) => {
      if (response.errorType) {
        EchoHubApi.handleError(alexa, response);
        return;
      }

      this.emit(:tell, this.t('RESPONSE', { time: response.time });
    }
  },
};

export default (event, context) => {
  const alexa = Alexa.handler(event, context);
  alexa.appId = process.env.ALEXA_SKILL_ID;
  // If you don't localise your own module just don't pass anything below
  alexa.resources = EchoHubApi.languageStrings(languageStrings);

  echohub.handler(event, context);

  alexa.registerHandlers(handlers);
  alexa.execute();
};

Development

After checking out the repo, run yarn test to run the tests.

To release a new version:

  • yarn test
  • yarn publish

This will run the tests, update the version, create a git tag for the version, push git commits and tags. Publish the module file to npmjs.com.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/echohubio/echohub-alexa-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the ISC License.

Keywords

FAQs

Package last updated on 30 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc