I followed a JSNode tutorial on how to create an API, the tutorial used hard coded values. If I want to pass in a variable from Swift code how do I do it? And how do I update the activity variables in real time?
// Create a bit more complex activity
activity = {
'id' : 'ef696c12-69ab-11e4-8080-80003644b625',
'name': 'Tom',
'started_at': new Date(),
'delivery_price': 8,
'location': {'type': 'point', 'coordinates': [37.769722,-122.476944]
'to' : ['notification:jack'] }
};
user1.addActivity(activity)
.then(function(data) { /* on success */ })
.catch(function(reason) { /* on failure */ });
via Davidson Otobo
No comments:
Post a Comment