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
| class TheMovieDBService(private val gson: Gson) { | |
| fun getNowPlayingMovies(locale: String): List<Movie> { | |
| val retrofit = Retrofit.Builder() | |
| .addConverterFactory(GsonConverterFactory.create(gson)) | |
| .baseUrl("https://api.themoviedb.org/3/") | |
| .build() | |
| val theMovieDBAPI = retrofit.create(TheMovieDBAPI::class.java) |
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
| interface TheMovieDBAPI { | |
| @GET("movie/now_playing") | |
| fun getNowPlaying( | |
| @Query("api_key") apiKey: String, | |
| @Query("language") language: String, | |
| @Query("page") page: Int, | |
| @Query("region") region: String | |
| ): Call<ApiResults> |
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
| data class ApiResults(val results: List<Movie>) |
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
| data class Movie(val title: String, val originalTitle: String, val releaseDate: String, val originalLanguage: String) |
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
| implementation 'com.squareup.retrofit2:retrofit:2.1.0' | |
| implementation 'com.squareup.retrofit2:converter-gson:2.1.0' |
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
| const ScheduleIntentHandler = { | |
| canHandle(handlerInput) { | |
| return handlerInput.requestEnvelope.request.type === 'IntentRequest' | |
| && handlerInput.requestEnvelope.request.intent.name === 'ScheduleIntent'; | |
| }, | |
| handle(handlerInput) { | |
| const {intent} = handlerInput.requestEnvelope.request; | |
| const slotTime = intent.slots.slotTime.value; | |
| const talkTopic = intent.slots.talkTopic; |
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.exports = { | |
| talks: [ | |
| {"track":"1", "time": "09:00", "title":"<lang xml:lang='en-US'>Keynote</lang>", "topics":[]}, | |
| {"track":"1", "time": "10:15", "title":"Dando a amor a los tests con Kotlin", "topics":["jvm"]}, | |
| {"track":"1", "time": "11:15", "title":"Alexa, ¿has venido para quedarte?", "topics":["alexa", "asistentes de voz"]}, | |
| {"track":"1", "time": "12:15", "title":"Java 10, ¿mito o realidad?", "topics":["jvm"]}, | |
| {"track":"1", "time": "13:15", "title":"Conoce a LUIS", "topics":["microsoft", "asistentes de voz"]}, | |
| {"track":"1", "time": "15:30", "title":"Creando un juego con el asistente de Google", "topics":["google", "asistentes de voz"]}, | |
| {"track":"1", "time": "16:30", "title":"El modelo Spotify", "topics":["agile"]}, | |
| {"track":"1", "time": "17:45", "title":"Keynote de cierre", "topics":[]}, |
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
| { | |
| "interactionModel": { | |
| "languageModel": { | |
| "invocationName": "conferencia muy molona", | |
| "intents": [ | |
| { | |
| "name": "AMAZON.CancelIntent", | |
| "samples": [] | |
| }, | |
| { |
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
| // This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2). | |
| // Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management, | |
| // session persistence, api calls, and more. | |
| const Alexa = require('ask-sdk-core'); | |
| const talksRepository = require('./talks-repository'); | |
| const interceptors = require('./interceptors'); | |
| const LaunchRequestHandler = { | |
| canHandle(handlerInput) { | |
| return handlerInput.requestEnvelope.request.type === 'LaunchRequest'; |
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
| // This request interceptor will log all incoming requests to this lambda | |
| const LoggingRequestInterceptor = { | |
| process(handlerInput) { | |
| console.log(`Incoming request: ${JSON.stringify(handlerInput.requestEnvelope)}`); | |
| } | |
| }; | |
| // This response interceptor will log all outgoing responses of this lambda | |
| const LoggingResponseInterceptor = { | |
| process(handlerInput, response) { |