Permalink
Browse files

Some jsdoc refinements for Jquery client

  • Loading branch information...
tedeh committed Jun 30, 2012
1 parent 92f8ac5 commit 47ee81014f621b9f36bbddd96d307cb28381ee6a
Showing with 14 additions and 2 deletions.
  1. +1 −0 lib/client/http.js
  2. +7 −2 lib/client/jquery.js
  3. +6 −0 lib/server/index.js
View
@@ -5,6 +5,7 @@ var Client = require('./index');
/**
* Constructor for a Jayson HTTP Client
* @class Jayson JSON-RPC HTTP Client
+ * @constructor
* @extends Client
* @param {Object} [options] Optional hash of settings
* @return {HttpClient}
View
@@ -3,8 +3,10 @@
/**
* Constructor for a Jayson Jquery Client
* @class Jayson JSON-RPC Jquery Client
+ * @name JqueryClient
* @param {Object} options Settings for the ajax request
* @return {JqueryClient}
+ * @api public
*/
var JqueryClient = function(options) {
if(!(this instanceof JqueryClient)) return new JqueryClient(options);
@@ -18,7 +20,7 @@
this.options = $.extend(defaults, options || {});
};
-
+
window.Jayson = JqueryClient;
/**
@@ -42,7 +44,10 @@
$.ajax(options);
};
- // Expose the client as a jQuery extension
+ /**
+ * Expose the client as a jQuery extension
+ * @ignore
+ */
$.fn.jayson = function(options) {
options = options || {};
var client = new JqueryClient(options);
View
@@ -265,6 +265,9 @@ Server.prototype._batch = function(requests, callback) {
var responses = [];
+ /**
+ * @ignore
+ */
var maybeRespond = function() {
var done = responses.every(function(res) { return res !== null; });
if(done) {
@@ -276,6 +279,9 @@ Server.prototype._batch = function(requests, callback) {
}
}
+ /**
+ * @ignore
+ */
var wrapper = function(request, index) {
responses[index] = null;
return function() {

0 comments on commit 47ee810

Please sign in to comment.