[AC-738] Ti.Cloud Node.ACS Statuses Methods Incomplete in Node.ACS
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | n/a | 
| Status | Resolved | 
| Resolution | Duplicate | 
| Resolution Date | 2014-06-16T21:45:07.000+0000 | 
| Affected Version/s | n/a | 
| Fix Version/s | n/a | 
| Components | Appcelerator Modules | 
| Labels | node-acs | 
| Reporter | Dave Hudson | 
| Assignee | Shuo Liang | 
| Created | 2014-05-06T14:50:32.000+0000 | 
| Updated | 2016-03-08T07:36:59.000+0000 | 
Description
	When using Node.ACS the acs-node lib is incomplete compared to the normally available methods for Statuses. If you try to either edit, update or delete a status using Node.ACS you will get an error similar to the following: 
TypeError: Object #
Hello Dave, The API has not been completely ported to the node-acs library. But this is an ongoing process. In the mean time, I would suggest using an xhr request to simulate a curl request. // Seth
Hi Dave, For now, if you want use show, update or delete method in Node.ACS app, you can go with REST API way to work around. Like this:
var ACS = require('acs').ACS; var acs = ACS.initACS('<App Key>'); var logger = require('acs').logger; // status show method function show(req, res) { var data = { status_id: '5369a57415d82732262876c7' }; acs.rest('statuses/show.json', 'GET', data, function(e){ if(e && e.meta) { if(e.meta.status == 'ok') { var status = e.response.statuses[0]; logger.info('Success:\n' + 'id: ' + status.id + '\n' + 'updated_at: ' + status.updated_at); res.redirect('/main'); } else { res.render('index', {message: e.meta.message}); } } else { res.render('index', {message: e.meta.message}); } }, req, res); }Thanks Shuo, that works great!