ngin_client
Advanced tools
Comparing version 0.1.21 to 0.1.23
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
@@ -12,3 +13,4 @@ module.exports = ApiClient | ||
'messages/*.js', | ||
'boss/*.js' | ||
'boss/*.js', | ||
'venues/*.js' | ||
] | ||
@@ -24,3 +26,3 @@ | ||
files.forEach(function(modelPath) { | ||
modelName = modelPath.substring(modelPath.indexOf('/')+1).replace('.js','') | ||
var modelName = modelPath.substring(modelPath.indexOf('/')+1).replace('.js','') | ||
modelName = modelName.charAt(0).toUpperCase() + modelName.substring(1) | ||
@@ -27,0 +29,0 @@ var Model = require('./'+modelPath) |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
{ | ||
"name": "ngin_client", | ||
"version": "0.1.21", | ||
"version": "0.1.23", | ||
"description": "Node client for interacting with the NGIN API services", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var _ = require('underscore') | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
@@ -2,0 +3,0 @@ var Url = require('url') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var _ = require('underscore') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -2,0 +3,0 @@ var request = require('request') |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -18,3 +19,3 @@ var _ = require('underscore') | ||
urlRoot: function() { | ||
urlRoot: function(options) { | ||
options = options || {} | ||
@@ -26,3 +27,3 @@ var venueID = options.venue_id || this.venue_id | ||
var base = config.urls && config.urls.venues || config.url | ||
return Url.resolve(base, '/venues' + this.venue_id + '/subvenues') | ||
return Url.resolve(base, '/venues/' + this.venue_id + '/subvenues') | ||
} | ||
@@ -29,0 +30,0 @@ |
@@ -0,1 +1,2 @@ | ||
"use strict" | ||
var Url = require('url') | ||
@@ -21,2 +22,12 @@ var _ = require('underscore') | ||
return Url.resolve(base, '/venues') | ||
}, | ||
availableTimes: function(callback) { | ||
var url = this.urlRoot() + '/' + this.id + '/available_times' | ||
Venue.sync('read', null, { url:url }, callback) | ||
}, | ||
updateAvailableTimes: function(callback) { | ||
var url = this.urlRoot() + '/' + this.id + '/available_times' | ||
Venue.sync('update', null, { url:url }, callback) | ||
} | ||
@@ -23,0 +34,0 @@ |
42989
38
1373