Oli Newsham
Created June 29, 2017

Dot Net North Skill

A skill that tells you all about the Dot Net Nort usergroup. Dates, topics, location and all integrated with the Alexa app.

BeginnerShowcase (no instructions)2 hours15
Dot Net North Skill

Things used in this project

Story

Read more

Schematics

Alpaca!

Added a logo because I can't submit without a schematic...

Code

Dot Net North Skill

JavaScript
var Alexa = require('alexa-sdk');

exports.handler = function(event, context, callback) {
    var alexa = Alexa.handler(event, context);
    alexa.APP_ID = 'amzn1.ask.skill.ccba1e95-1b13-45ba-bc48-ed67534587ad';
    alexa.registerHandlers(handlers);
    alexa.execute();
};

var handlers = {
    'LaunchRequest': function () {
        this.emit(':ask', 'Hi! How can I help?');
    },
    'EventInformationIntent': function () {
        var speechOutput = 'The next event is on Tuesday the 25th of July at 7 PM at Rise Manchester. The topic is "Real-World dot net Core: Everything You Need to Know" with Keith Williams. I\'ve sent full details to your Alexa app.';
        var cardTitle = 'Dot Net North July';
        var cardContent = 'Keith Williams leads the development team at Sun Branding Solutions, working on software that designs and packages a surprisingly large proportion of the items in your shopping basket.\r\n  Keith\'s team have been proudly and successfully running .NET Core apps in production since the balmy days of beta4 in 2015, and here he is to share his experience and hard-won knowledge of the field with us.\r\n If you\'ve been paddling in the changeable cross-platform waters yourself, are confused and surprised by the current expanding landscape, or are just wondering what the point of it all is, then this talk is for you. Keith will shed light on the history of .Net Core, convince you of the benefits of its adoption, and give you tips on how to successfully develop and deploy on it with minimal manoeuvrings.\r\n Come to this talk and you will get two years of professional .NET Core experience distilled down into one juicy, brain-oxygenating session.\r\nAs usual we kick off at 7 PM and finish around 9 PM';
        this.emit(':tellWithCard', speechOutput, cardTitle, cardContent);
    },
    'LocationIntent': function () {
        var speechOutput = 'The next event is at Eise Manchester on Deansgate. I\'ve sent the full address to your Alexa app.';
        var cardTitle = 'Dot Net North July';
        var cardContent = 'Rise Manchester, 231 Deansgate, Manchester, M3 4EN';
        this.emit(':tellWithCard', speechOutput, cardTitle, cardContent);
    },
    'TicketIntent': function () {
        var speechOutput = 'You can book free tickets for all our events on Meetup.com. Just search for Dot Net North. I\'ve sent details to your Alexa app';
        var cardTitle = 'Dot Net North Tickets';
        var cardContent = 'You can book free tickets for any Dot Net North event at https://www.meetup.com/DotNetNorth.';
        this.emit(':tellWithCard', speechOutput, cardTitle, cardContent);
    },
    'AlpacaIntent': function () {
        var speechOutput = 'Friendly but stern, wise and presumably competent at IT - in the dev-shop of animals, the alpaca would be the technical architect, seeing far into the distance from its mountain pedestal.';
        
        this.emit(':tell', speechOutput);
    },
    'AMAZON.HelpIntent': function () {
        var speechOutput = "I can get information, dates, and directions to the next event, or I can help you to book tickets. What would you like to do?";
        var reprompt = "What would you like to do?";
        this.emit(':ask', speechOutput, reprompt);
    },
    'AMAZON.CancelIntent': function () {
        this.emit(':tell', 'Goodbye!');
    },
    'AMAZON.StopIntent': function () {
        this.emit(':tell', 'Goodbye!');
    }
};

Credits

Oli Newsham
0 projects • 2 followers
Cynical dev, climber, & lover of all things apocalyptic. Gay. Filled with loathing for a great number of people, places, and things.

Comments