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 */ });

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/dbacba1b-bb26-4472-8142-6a1f00baf6f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to