forked from one-up/rpcoder
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAPIInterface.erb
More file actions
28 lines (25 loc) · 835 Bytes
/
APIInterface.erb
File metadata and controls
28 lines (25 loc) · 835 Bytes
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
/* generated by rpcoder */
package <%= name_space %>
{
public interface <%= api_class_name %>Interface
{
function get baseUrl():String;
function set errorHandler(handler : Function):void;
function get errorHandler():Function;
<%- functions.each do |func| -%>
/**
* <%= func.description %>
*
<%- func.params.each do |param| -%>
* @<%= param.name %>:<%= param.type %> <%= param.options[:expect] %> <%= param.options[:description] %>
<%- end -%>
* @success:Function
* @error:Function
*/
<%-
params = func.params.map{|i| [i.name, i.type].join(':') } + ['success:Function', 'error:Function = null']
-%>
function <%= func.name %>(<%= params.join(', ') %>):void;
<%- end -%>
}
}