+ req.error(this, function() {
+ if (req.xhrResponse.status == 403) {
+ this.authenticationFailed();
+ }
+ });
+ req.go();
+ },
+ clearStatus: function(type) {
+ if (!blerg.API.loggedIn)
+ throw new Error('Cannot request feed status when not logged in');
+
+ if (!(type == 'feed' || type == 'mentioned'))
+ throw new Error('Invalid status clear type: ' + type);
+
+ var req = new enyo.Ajax({
+ url: baseURL + '/status',
+ method: 'POST',
+ postBody: {
+ clear: type
+ }
+ });
+ req.response(this, function(inSender, inResponse) {
+ inResponse.type = type;
+ this.bubble('onClearStatus', inResponse);
+ });
+ req.error(this, function() {
+ if (req.xhrResponse.status == 403) {
+ this.authenticationFailed();
+ }
+ });
+ req.go();