MyApi.js.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <!-- start:source.tmpl.hbs -->
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width">
  7. <title>MyApi.js</title>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link href="https://fonts.googleapis.com/css?family=PT+Mono" rel="stylesheet">
  12. <link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
  13. <link type="text/css" rel="stylesheet" href="css/prism.min.css">
  14. <link type="text/css" rel="stylesheet" href="css/template.min.css">
  15. <script type="text/javascript">
  16. window.TEMPLATE_OPTIONS = {"includeDate":true,"dateFormat":"Do MMM YYYY","systemName":"FooDoc","systemSummary":"A Bootstrap and Handlebars based template for JSDoc3.","systemLogo":"","systemColor":"","navMembers":[{"kind":"class","title":"Classes","summary":"All documented classes."},{"kind":"external","title":"Externals","summary":"All documented external members."},{"kind":"global","title":"Globals","summary":"All documented globals."},{"kind":"mixin","title":"Mixins","summary":"All documented mixins."},{"kind":"interface","title":"Interfaces","summary":"All documented interfaces."},{"kind":"module","title":"Modules","summary":"All documented modules."},{"kind":"namespace","title":"Namespaces","summary":"All documented namespaces."},{"kind":"tutorial","title":"Tutorials","summary":"All available tutorials."}],"footer":"","copyright":"FooDoc Copyright © 2016 The contributors to the JSDoc3 and FooDoc projects.","linenums":true,"collapseSymbols":true,"inverseNav":true,"inlineNav":false,"outputSourceFiles":true,"sourceRootPath":null,"disablePackagePath":true,"outputSourcePath":false,"showTableOfContents":true,"showAccessFilter":true,"analytics":null,"methodHeadingReturns":true,"sort":"linenum, longname, version, since","search":true,"favicon":null,"stylesheets":[],"scripts":[],"monospaceLinks":false,"cleverLinks":false};
  17. window.DOCLET_TOC_ENABLED = false;
  18. window.DOCLET_AFILTER_ENABLED = false;
  19. </script>
  20. </head>
  21. <body>
  22. <!-- start:navbar.hbs -->
  23. <header class="navbar navbar-default navbar-fixed-top navbar-inverse">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <a class="navbar-brand" href="index.html">
  27. FooDoc
  28. </a>
  29. <!-- displayed on small devices -->
  30. <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. <span class="icon-bar"></span>
  34. </button>
  35. </div>
  36. <div class="navbar-collapse collapse" id="topNavigation">
  37. <ul class="nav navbar-nav">
  38. <li class="dropdown">
  39. <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Globals<b class="caret"></b></a>
  40. <ul class="dropdown-menu">
  41. <li><a href="global.html#SomeType">SomeType</a></li>
  42. </ul>
  43. </li>
  44. <li class="dropdown">
  45. <a href="list_class.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
  46. <ul class="dropdown-menu">
  47. <li><a href="CustomError.html">CustomError</a></li>
  48. <li><a href="GlobalClass.html">GlobalClass</a></li>
  49. <li><a href="MyApi.Child.html">MyApi.Child</a></li>
  50. <li><a href="MyApi.Class.html">MyApi.Class</a></li>
  51. </ul>
  52. </li>
  53. <li class="dropdown">
  54. <a href="list_namespace.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
  55. <ul class="dropdown-menu">
  56. <li><a href="MyApi.html">MyApi</a></li>
  57. <li><a href="MyApi.utils.html">MyApi.utils</a></li>
  58. </ul>
  59. </li>
  60. <li class="dropdown">
  61. <a href="list_tutorial.html" class="dropdown-toggle" data-toggle="dropdown">Tutorials<b class="caret"></b></a>
  62. <ul class="dropdown-menu">
  63. <li><a href="tutorial-brush-teeth.html">Brush Teeth</a></li>
  64. <li><a href="tutorial-drive-car.html">Drive Car</a></li>
  65. </ul>
  66. </li>
  67. </ul>
  68. <!-- start:lunr-search-navbar.hbs -->
  69. <form class="navbar-form navbar-right" role="search">
  70. <div class="input-group">
  71. <input type="text" class="form-control" placeholder="Search" id="lunr-search-input">
  72. <div class="input-group-btn">
  73. <button class="btn btn-default" id="lunr-search-submit">
  74. <i class="glyphicon glyphicon-search"></i>
  75. </button>
  76. </div>
  77. </div>
  78. </form>
  79. <!-- start:lunr-search-navbar.hbs --> </div>
  80. </div>
  81. </header>
  82. <!-- end:navbar.hbs --> <div class="page-header">
  83. <div class="container">
  84. <span class="kind">source</span>
  85. <h1><span class="name">MyApi.js</span></h1>
  86. </div>
  87. </div>
  88. <div class="container content">
  89. <div class="row">
  90. <div class="col-md-12 main-content">
  91. <section class="source-section">
  92. <article></article>
  93. <pre class="prettyprint source language-javascript line-numbers"><code class="language-javascript">/**
  94. * @summary This is the test summary for the `MyApi` namespace.
  95. * @namespace MyApi
  96. * @description This is the longer description for the namespace giving a better idea about the code contained within it.
  97. */
  98. window.MyApi = {
  99. /**
  100. * @summary This is a static member of the namespace.
  101. * @memberof MyApi.
  102. * @name staticMember
  103. * @type {string}
  104. * @default I'm a member of the MyApi namespace.
  105. */
  106. staticMember: "I'm a member of the MyApi namespace."
  107. };
  108. /**
  109. * @summary This is a test type definition on the MyApi namespace.
  110. * @memberof MyApi~
  111. * @typedef {Object} Object
  112. * @prop {string} name - This is the name of the test object.
  113. * @prop {boolean} [enabled=false] - This is whether or not the test object is enabled. Defaults to `false`.
  114. */
  115. /**
  116. * @summary This is the summary of the MyApi test class, test `markdown`.
  117. * @memberof MyApi
  118. * @constructor Class
  119. * @param {string} arg1 - The first test arg, test `markdown`.
  120. * @param {...string} [arg2=false] - A repeatable, optional argument with a default value of false, test `markdown`.
  121. * @description This is the description for the class this is meant to be a more in depth explanation of what this class does and it's general use case, test `markdown`
  122. * @example {@caption You can provide example captions with `markdown` and specify the language to use when rendering the code, defaults to `javascript`.}
  123. * var gc = new GlobalClass("arg1", "arg2");
  124. * @example {@lang xml}
  125. * &lt;head>
  126. * &lt;title>HTML Highlighting&lt;/title>
  127. * &lt;script>
  128. * // supports embedded languages
  129. * var gc = new GlobalClass("arg1", "arg2");
  130. * &lt;/script>
  131. * &lt;/head>
  132. */
  133. MyApi.Class = function(arg1, arg2){
  134. /**
  135. * @summary I'm a member of the class.
  136. * @memberof MyApi.Class#
  137. * @name publicMember
  138. * @type {string}
  139. * @default "I'm an instance member."
  140. */
  141. this.publicMember = "I'm an instance member.";
  142. /**
  143. * @summary I'm a protected member of the class.
  144. * @memberof MyApi.Class#
  145. * @name protectedMember
  146. * @type {string}
  147. * @default "I'm a protected member."
  148. * @protected
  149. */
  150. this.protectedMember = "I'm a protected member.";
  151. /**
  152. * @summary I'm a private member of the class.
  153. * @memberof MyApi.Class#
  154. * @name _privateMember
  155. * @type {string}
  156. * @default "I'm a private member."
  157. * @private
  158. */
  159. this._privateMember = "I'm a private member.";
  160. };
  161. /**
  162. * @summary This is a test instance method of the MyApi test class, test `markdown`.
  163. * @memberof MyApi.Class#
  164. * @function testMethod
  165. * @param {*} value - Any value, test `markdown`
  166. * @param {Object} obj - The first object of what could be many, test `markdown`
  167. * @param {...Object} [objN] - Any additional objects, test `markdown`
  168. * @returns {Object} The combination of all the objects, test `markdown`.
  169. * @description This method is not overridden in the {@link MyApi.Child} class but is simply inherited.
  170. * @fires MyApi.Class~"test.my-api"
  171. * @throws {CustomError} This is thrown when some condition fails within this method.
  172. */
  173. MyApi.Class.prototype.testMethod = function(value, obj, objN){
  174. /**
  175. * @summary This is an event raised by this class, it's documentation appears on this page as the event is specified as an inner member the class by using the tilde (~) scope.
  176. * @memberof MyApi.Class~
  177. * @event "test.my-api"
  178. * @param {Event} e - The event object.
  179. * @param {*} custom - Some custom parameter passed to any listeners.
  180. */
  181. throw new CustomError("Some custom error.");
  182. };
  183. /**
  184. * @summary This is a another test instance method of the MyApi test class, test `markdown`.
  185. * @memberof MyApi.Class#
  186. * @function anotherMethod
  187. * @param {*} value - Any value, test `markdown`
  188. * @param {Object} obj - The first object of what could be many, test `markdown`
  189. * @param {...Object} [objN] - Any additional objects, test `markdown`
  190. * @returns {Object} The combination of all the objects, test `markdown`.
  191. * @description This method is overridden in the {@link MyApi.Child} class and should remove the exception documentation as it no longer applies.
  192. * @fires MyApi.Class~"another.my-api"
  193. * @throws {CustomError} This is thrown when some condition fails within this method.
  194. */
  195. MyApi.Class.prototype.anotherMethod = function(value, obj, objN){
  196. /**
  197. * @summary This is an event raised by this class, it's documentation appears on this page as the event is specified as an inner member the class by using the tilde (~) scope.
  198. * @memberof MyApi.Class~
  199. * @event "another.my-api"
  200. * @param {Event} e - The event object.
  201. * @param {*} custom - Some custom parameter passed to any listeners.
  202. */
  203. };
  204. /**
  205. * @summary This is a test type definition on the MyApi.Class class.
  206. * @memberof MyApi.Class~
  207. * @typedef {Object} Object
  208. * @prop {string} name - The name of the test object.
  209. * @prop {boolean} [enabled=false] - Whether or not the test object is enabled. Defaults to `false`.
  210. * @prop {Object} sub - An object containing a subset of properties.
  211. * @prop {number} sub.id - The subset id.
  212. * @prop {boolean} [sub.name="Sub Options"] - The name of the sub object. Defaults to `"Sub Options"`.
  213. */
  214. /**
  215. * @summary This is the summary of the MyApi child class, test `markdown`.
  216. * @memberof MyApi
  217. * @constructor Child
  218. * @extends MyApi.Class
  219. */
  220. MyApi.Child = function(){
  221. /**
  222. * @summary I'm a protected member of the class.
  223. * @memberof MyApi.Child#
  224. * @name protectedMember
  225. * @type {string}
  226. * @default "I'm a protected member."
  227. * @protected
  228. */
  229. this.protectedMember = "I'm a protected member.";
  230. };
  231. /**
  232. * @summary This is a another test instance method of the MyApi child class, test `markdown`.
  233. * @memberof MyApi.Child#
  234. * @function anotherMethod
  235. * @param {*} value - Any value, test `markdown`
  236. * @param {Object} obj - The first object of what could be many, test `markdown`
  237. * @param {...Object} [objN] - Any additional objects, test `markdown`
  238. * @returns {Object} The combination of all the objects, test `markdown`.
  239. * @description This method overrides the {@link MyApi.Class#anotherMethod} and should remove the exception documentation as it no longer applies. The event should also be updated to reflect it is raised by this class and not the inherited one.
  240. * @fires MyApi.Child~"another.my-api"
  241. */
  242. MyApi.Child.prototype.anotherMethod = function(value, obj, objN){
  243. /**
  244. * @summary This is an event raised by this class, it's documentation appears on this page as the event is specified as an inner member the class by using the tilde (~) scope.
  245. * @memberof MyApi.Child~
  246. * @event "another.my-api"
  247. * @param {Event} e - The event object.
  248. * @param {*} custom - Some custom parameter passed to any listeners.
  249. */
  250. };</code></pre>
  251. </section>
  252. </div>
  253. </div>
  254. </div>
  255. <footer>
  256. <div class="copyright">FooDoc Copyright © 2016 The contributors to the JSDoc3 and FooDoc projects.</div>
  257. <div class="generated-by">Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on 1st May 2018 using the <a href="https://github.com/steveush/foodoc">FooDoc template</a>.</div>
  258. </footer>
  259. <script src="js/jquery.min.js"></script>
  260. <script src="js/bootstrap.min.js"></script>
  261. <script src="js/clipboard.min.js"></script>
  262. <script src="js/prism.min.js"></script>
  263. <script src="js/template.min.js"></script>
  264. <!-- start:lunr-search-modal.hbs -->
  265. <div class="modal fade" id="lunr-search-modal">
  266. <div class="modal-dialog">
  267. <div class="modal-content">
  268. <div class="modal-header">
  269. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  270. <h4 class="modal-title">Search results</h4>
  271. </div>
  272. <div class="modal-body" id="lunr-search-body">
  273. </div>
  274. <div class="modal-footer" id="lunr-search-footer">
  275. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  276. </div>
  277. </div><!-- /.modal-content -->
  278. </div><!-- /.modal-dialog -->
  279. </div>
  280. <!-- end:lunr-search-modal.hbs --> <script src="js/lunr.min.js"></script>
  281. </body>
  282. </html>
  283. <!-- end:source.tmpl.hbs -->