[MediaWiki-commits] [Gerrit] Updated code documentation - change (mediawiki...WikibaseJavaScriptApi)

2014-12-16 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Updated code documentation
..


Updated code documentation

Updated code documentation to be able to generate documentation using JSDuck.
Includes resetting @since tags to 1.0.

Change-Id: I8d08e17970faec48565b1af6683594301725d41f
---
M .jshintrc
M README.md
M WikibaseJavaScriptApi.php
M src/FormatValueCaller.js
M src/ParseValueCaller.js
M src/RepoApi.js
M src/RepoApiError.js
M src/getLocationAgnosticMwApi.js
M src/namespace.js
9 files changed, 463 insertions(+), 300 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved



diff --git a/.jshintrc b/.jshintrc
index a5afa4d..832d316 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -48,7 +48,6 @@
 
browser   : true, // Standard browser globals e.g. `window`, 
`document`.
 
-   indent: 4,
quotmark: false,
maxlen: 100,
maxparams: 7,
diff --git a/README.md b/README.md
index eb9ac81..8c60801 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,11 @@
 
 ## Release notes
 
+### 1.0.2 (dev)
+
+ Enhancements
+* Updated code documentation to be able to generate documentation using JSDuck.
+
 ### 1.0.1 (2014-11-28)
 
 * Bump the data-values/javascript dependency to 0.6.0 so that it matches 
Wikibase.git's.
diff --git a/WikibaseJavaScriptApi.php b/WikibaseJavaScriptApi.php
index 25a9fa4..301bd19 100644
--- a/WikibaseJavaScriptApi.php
+++ b/WikibaseJavaScriptApi.php
@@ -1,6 +1,6 @@
 ?php
 
-define( 'WIKIBASE_JAVASCRIPT_API_VERSION', '1.0.1' );
+define( 'WIKIBASE_JAVASCRIPT_API_VERSION', '1.0.2-dev' );
 
 if ( defined( 'MEDIAWIKI' ) ) {
call_user_func( function() {
diff --git a/src/FormatValueCaller.js b/src/FormatValueCaller.js
index 0f44558..21060ac 100644
--- a/src/FormatValueCaller.js
+++ b/src/FormatValueCaller.js
@@ -1,13 +1,14 @@
-/**
- * @licence GNU GPL v2+
- * @author H. Snater  mediaw...@snater.com 
- */
 ( function( wb, $ ) {
'use strict';
 
var MODULE = wb.api;
 
/**
+* @class wikibase.api.FormatValueCaller
+* @since 1.0
+* @licence GNU GPL v2+
+* @author H. Snater  mediaw...@snater.com 
+*
 * @constructor
 *
 * @param {wikibase.api.RepoApi} api
@@ -21,30 +22,36 @@
$.extend( SELF.prototype, {
 
/**
-* @type {wikibase.api.RepoApi}
+* @property {wikibase.api.RepoApi}
+* @private
 */
_api: null,
 
/**
-* @type {dataTypes.DataTypeStore}
+* @property {dataTypes.DataTypeStore}
+* @private
 */
_dataTypeStore: null,
 
/**
 * Makes a request to the API to format values on the server 
side. Will return a
-* jQuery.Promise which will be resolved if formatting is 
successful or rejected if it fails
-* or the API cannot be reached.
-* @since 0.5
+* `jQuery.Promise` which will be resolved if formatting is 
successful or rejected if it
+* fails or the API cannot be reached.
 *
 * @param {dataValues.DataValue} dataValue
-* @param {string} [dataType]
-* @param {string} [outputFormat]
+* @param {string|Object} [dataType] `DataType` id.
+*Assumed to be `outputFormat` if the `dataTypeStore` 
the `FormatValueCaller` has
+*been initialized with, does not contain a data type 
whose id matches the string
+*supplied via this argument.
+*Assumed to be `options` if {Object} and no additional 
arguments are provided.
+* @param {string|Object} [outputFormat]
+*Assumed to be `options` if {Object} and no additional 
arguments are provided.
 * @param {Object} [options]
-* @return {jQuery.Promise}
-* Resolved parameters:
-* - {string} Formatted DataValue.
-* Rejected parameters:
-* - {wikibase.api.RepoApiError}
+* @return {Object} jQuery.Promise
+* @return {Function} return.done
+* @return {string} return.done.formattedValue Formatted 
`DataValue`.
+* @return {Function} return.fail
+* @return {wikibase.api.RepoApiError} error
 */
formatValue: function( dataValue, dataType, outputFormat, 
options ) {
 
diff --git a/src/ParseValueCaller.js b/src/ParseValueCaller.js
index 01f06b4..aa26af2 100644
--- a/src/ParseValueCaller.js
+++ b/src/ParseValueCaller.js
@@ -1,8 +1,3 @@
-/**
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw  

[MediaWiki-commits] [Gerrit] Updated code documentation - change (mediawiki...WikibaseJavaScriptApi)

2014-11-28 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/176337

Change subject: Updated code documentation
..

Updated code documentation

Updated code documentation to be able to generate documentation using JSDuck.
Includes resetting @since tags to 1.0.

Change-Id: I8d08e17970faec48565b1af6683594301725d41f
---
M .jshintrc
M README.md
M init.php
M src/FormatValueCaller.js
M src/ParseValueCaller.js
M src/RepoApi.js
M src/RepoApiError.js
M src/getLocationAgnosticMwApi.js
M src/namespace.js
9 files changed, 470 insertions(+), 296 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseJavaScriptApi 
refs/changes/37/176337/1

diff --git a/.jshintrc b/.jshintrc
index a5afa4d..832d316 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -48,7 +48,6 @@
 
browser   : true, // Standard browser globals e.g. `window`, 
`document`.
 
-   indent: 4,
quotmark: false,
maxlen: 100,
maxparams: 7,
diff --git a/README.md b/README.md
index eb9ac81..8c60801 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,11 @@
 
 ## Release notes
 
+### 1.0.2 (dev)
+
+ Enhancements
+* Updated code documentation to be able to generate documentation using JSDuck.
+
 ### 1.0.1 (2014-11-28)
 
 * Bump the data-values/javascript dependency to 0.6.0 so that it matches 
Wikibase.git's.
diff --git a/init.php b/init.php
index 25a9fa4..301bd19 100644
--- a/init.php
+++ b/init.php
@@ -1,6 +1,6 @@
 ?php
 
-define( 'WIKIBASE_JAVASCRIPT_API_VERSION', '1.0.1' );
+define( 'WIKIBASE_JAVASCRIPT_API_VERSION', '1.0.2-dev' );
 
 if ( defined( 'MEDIAWIKI' ) ) {
call_user_func( function() {
diff --git a/src/FormatValueCaller.js b/src/FormatValueCaller.js
index 0f44558..be62a2e 100644
--- a/src/FormatValueCaller.js
+++ b/src/FormatValueCaller.js
@@ -8,6 +8,11 @@
var MODULE = wb.api;
 
/**
+* @class wikibase.api.FormatValueCaller
+* @since 1.0
+* @licence GNU GPL v2+
+* @author H. Snater  mediaw...@snater.com 
+*
 * @constructor
 *
 * @param {wikibase.api.RepoApi} api
@@ -21,30 +26,36 @@
$.extend( SELF.prototype, {
 
/**
-* @type {wikibase.api.RepoApi}
+* @property {wikibase.api.RepoApi}
+* @private
 */
_api: null,
 
/**
-* @type {dataTypes.DataTypeStore}
+* @property {dataTypes.DataTypeStore}
+* @private
 */
_dataTypeStore: null,
 
/**
 * Makes a request to the API to format values on the server 
side. Will return a
-* jQuery.Promise which will be resolved if formatting is 
successful or rejected if it fails
-* or the API cannot be reached.
-* @since 0.5
+* ```jQuery.Promise``` which will be resolved if formatting is 
successful or rejected if it
+* fails or the API cannot be reached.
 *
 * @param {dataValues.DataValue} dataValue
-* @param {string} [dataType]
-* @param {string} [outputFormat]
+* @param {string|Object} [dataType] ```DataType``` id.
+*Assumed to be ```outputFormat``` if the 
```dataTypeStore``` the
+*```FormatValueCaller``` has been initialized with, 
does not contain a data type
+*whose id matches the string supplied via this 
argument.
+*Assumed to be ```options``` if {Object} and no 
additional arguments are provided.
+* @param {string|Object} [outputFormat]
+*Assumed to be ```options``` if {Object} and no 
additional arguments are provided.
 * @param {Object} [options]
-* @return {jQuery.Promise}
-* Resolved parameters:
-* - {string} Formatted DataValue.
-* Rejected parameters:
-* - {wikibase.api.RepoApiError}
+* @return {Object} jQuery.Promise
+* @return {Function} return.done
+* @return {string} return.done.formattedValue Formatted 
```DataValue```.
+* @return {Function} return.fail
+* @return {wikibase.api.RepoApiError} error
 */
formatValue: function( dataValue, dataType, outputFormat, 
options ) {
 
diff --git a/src/ParseValueCaller.js b/src/ParseValueCaller.js
index 01f06b4..327971b 100644
--- a/src/ParseValueCaller.js
+++ b/src/ParseValueCaller.js
@@ -1,8 +1,3 @@
-/**
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw  jeroended...@gmail.com 
- * @author H. Snater  mediaw...@snater.com 
- */
 ( function( wb, $ ) {
 'use strict';