This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'slots': { | |
'AIRPORTCODE': 'FAACODES' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.intent('airportinfo', { | |
'slots': { | |
'AIRPORTCODE': 'FAACODES' | |
}, | |
'utterances': ['{|flight|airport} {|delay|status} {|info} {|for} {-|AIRPORTCODE}'] | |
}, | |
function(req, res) { | |
} | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0", | |
"sessionAttributes": {}, | |
"response": { | |
"shouldEndSession": false, | |
"outputSpeech": { | |
"type": "SSML", | |
"ssml": "<speak>For delay information, tell me an Airport code.</speak>" | |
}, | |
"reprompt": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.change_code = 1; | |
var _ = require('lodash'); | |
var Alexa = require('alexa-app'); | |
var app = new Alexa.app('airportinfo'); | |
var FAADataHelper = require('./faa_data_helper'); | |
app.launch(function(req, res) { | |
var prompt = 'For delay information, tell me an Airport code.'; | |
res.say(prompt).reprompt(prompt).shouldEndSession(false); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.change_code = 1; | |
var _ = require('lodash'); | |
var Alexa = require('alexa-app'); | |
var skill = new Alexa.app('airportinfo'); | |
var FAADataHelper = require('./faa_data_helper'); | |
var utterancesMethod = skill.utterances; | |
skill.utterances = function() { | |
return utterancesMethod().replace(/\{\-\|/g, '{'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var segment = null; | |
var masks = (function() { | |
"use strict"; | |
// Segment Bitmasks for individual segments. | |
// Binary Or them together to create bitmasks | |
// a1|a2|b|c|d1|d2|e|f|g1|g2|h|i|j|k|l|m | |
var a1 = 1 << 0, | |
a2 = 1 << 1, | |
b = 1 << 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby object: | |
class SearchResult | |
extend ActiveModel::Naming | |
include ActiveModel::Serialization | |
attr_accessor :stories, :users, :friends | |
def id | |
hash | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T> Observable<T>.mySchedulers(): Observable<T> = this.observeOn(AndroidSchedulers.mainThread()).subscribeOn(Schedulers.newThread()) | |
fun requestAccessToken(): Observable<AuthResponse> { | |
return service.requestAccessToken(CLIENT_CREDENTIALS, DEVICE_ID).mySchedulers() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Observable<*>.mySchedulers() : Observable<*> = this.observeOn(AndroidSchedulers.mainThread()).subscribeOn(Schedulers.newThread()) | |
fun requestAccessToken(): Observable<*> { | |
val mySchedulers = service.requestAccessToken(CLIENT_CREDENTIALS, DEVICE_ID).mySchedulers() | |
return mySchedulers | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private final Observable.Transformer<Observable, Observable> mSchedulersTransformer = | |
observable -> observable.subscribeOn(Schedulers.newThread()) | |
.observeOn(AndroidSchedulers.mainThread()); | |
@SuppressWarnings("unchecked") | |
private <T> Observable.Transformer<T, T> applySchedulers() { | |
return (Observable.Transformer<T, T>) mSchedulersTransformer; | |
} |