Skip to content

Make the actual Weather Api Work  #14

@pk075

Description

@pk075

Hi guys,

i am trying to make the actual weather api stuff work. But i can´t seem to get it right. It looks like the context.forecast = forecast is always 0 despite the function getWeather returning the actual value.. Any help on that one?


// list of functions Wit.ai can execute
	['fetch-weather'](sessionId, context, cb) {
		// Here we can place an API call to a weather service
		 if (context.loc) {
		 	getWeather(context.loc)
		 		.then(function (forecast) {
		 			context.forecast = forecast 
                                         console.log(forecast)
		 		})
		 		.catch(function (err) {
		 			console.log(err)
		 		})
		 }

		cb(context)
	},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions