We’ve all been there. You *think* your flight is on time. But sure enough, by the time you get to the airport, you find that it’s been delayed for hours.
What if you could ask Alexa about your flight status before heading out the door? We built a skill that connects Alexa to the Laminar Flight API so that you can ask Alexa the status of your flight. Even better? We created a video tutorial that walks you through every step of the process. Check out the video tutorial below or visit our GitHub to see the code.
The end result will look something like this…
Let the hacking begin! Watch the tutorial below, follow along on GitHub and feel free to leave any questions in the comments.
One Alexa skill is never enough. Here are other project ideas that you could build by connecting to RapidAPI:
Let us know what you come up with and happy hacking.
We're thrilled to announce the latest update to the Rapid Enterprise API Hub (version 2024.3)!…
Are you curious about what your API consumers are searching for? Is your Hub effectively…
The RapidAPI team is excited to announce the February 2024 update (version 2024.2) for the…
This January's release brings exciting features and improvements designed to empower you and your developers.…
Rapid API is committed to providing its users with the best possible experience, and the…
In today's fast-paced digital world, APIs (Application Programming Interfaces) have become the backbone of modern…
View Comments
Hi David, really helpful tutorial. I was trying to build a skill for events using the Ticketmaster API on RapidAPI. I was having trouble parsing the responses. I receive an error:
TypeError: Cannot read property 'name' of undefined
at Object.EventHub.rapid.call.on [as success] (/var/task/index.js:25:41)
at Request.e [as _callback] (/var/task/node_modules/rapidapi-connect/index.js:90:46)
The error refers to the var eventName line in the index.js code below. I have tried but am having trouble parsing the response. It seems that the callback is successful but it cannot access the slots. Any ideas?
var Alexa = require('alexa-sdk');
const RapidAPI = new require('rapidapi-connect');
const rapid = new RapidAPI('EventHub', '####');
var handlers = {
'LaunchRequest': function() {
this.emit(':ask', 'Welcome to Event Hub. Ask something like, find rock concerts near Seattle');
},
'EventHub': function() {
var keyword = this.event.request.intent.slots.keyword.value;
//var region = this.event.request.Events.slots.Region.value;
rapid.call('Ticketmaster', 'searchEvents', {
'apiKey': '####',
'keyword': keyword
}).on ('success', (payload) => {
//console.log(payload);
var eventList = payload[0]["_embedded"]["events"];
this.emit(':tell', 'Listing 5 most recents events for ' + keyword);
for (var i = 0; i {
this.emit(':tell', 'Sorry, there was an error finding the event.');
});
}
};
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.appId = "####";
alexa.registerHandlers(handlers);
alexa.execute();
};
Very nice article!
So interesting article! Thanx!
Wow, it's amazing! I like it!
I think, it's interesting!