This repository has been archived by the owner on Jun 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
playtotv-define.js.hbs
80 lines (73 loc) · 1.92 KB
/
playtotv-define.js.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* Auto generated API: <tt>{{path}}</tt>
*
* <b>DO NOT MODIFY! CHANGES WILL BE OVERWRITTEN THE NEXT TIME YOU UPDATE!</b>
*
* <b>Note:</b> These are not real functions but method definitions for
* {@link playtotv.server.Server#call}.
*
* @name {{moduleName}}
* @memberOf {{modulePackage}}
* @namespace
*/
playtotv.define('{{modulePackage}}.{{moduleName}}', [], function() {
'use strict';
return {
/*jshint maxlen:300*/ // On occassion generated lines can be too long
/** @lends {{modulePackage}}.{{moduleName}} */
{{#join methods separator=",\n\n"}}
/**
{{~#partial "enum-values"}}{{#if enumValues}} Valid values: {{#join enumValues}}'{{.}}'{{/join}}{{/if}}{{/partial}}
{{#partial "dto-params"}}
* <ul>
{{#.}}
* <li><i>{ {{~type~}} }</i> <b>{{name}}</b>{{> enum-values}}{{#if pojo}}
{{#with pojo.fieldsData}}{{> dto-params}}{{/with}}{{/if}}</li>
{{/.}}
* </ul>
{{~/partial}}
{{#if requestDTOs.length}}
* <b>Request DTO's:</b>
{{#with requestDTOs}}{{> dto-params}}{{/with}}
*
{{/if}}
{{#if responseVar.pojo}}
* <b>Response data:</b>
{{#with responseVar.pojo.fieldsData}}{{> dto-params}}{{/with}}
*
{{/if}}
* @function
{{#if params.length}}
* @param {Object} params
{{#params}}
* @param { {{~type~}} } {{#if optional}}[{{/if}}params.{{name}}{{#if defaultValue}}={{defaultValue}}{{/if}}{{#if optional}}]{{/if}}{{> enum-values}}
{{/params}}
{{/if}}
* @returns {Promise} Promise of response data ({{responseVar.type}})
*/
{{name}}: {
{{#replace regexp=",\n$" by="\n"}}
label: '{{#replace regexp="API$"}}{{moduleName}}{{/replace}}.{{name}}',
url: '{{url}}',
{{#unless-equal type to="GET"}}
type: '{{type}}',
{{/unless-equal}}
{{#if queryVars.length}}
queryKeys: [
{{#join queryVars separator=",\n"}}
'{{name}}'
{{~/join}}
],
{{/if}}
{{#if requestVars.length}}
dataKeys: [
{{#join requestVars separator=",\n"}}
'{{name}}'
{{~/join}}
]
{{/if}}
{{/replace}}
}
{{~/join}}
};
});