lhj-tools 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51282e5a210a73525c73ce6c187cb89c7e1974383ab85d3f819a2d879b04ba1
|
4
|
+
data.tar.gz: b9e415c288460cfa16735e64feae9202d347a54070caf581ae4a3c7099de6f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a9a85100ae545826bd9cc332bd592e1f45e5958f58a4e24527b162da5f446d95d56a54cfa067a05aa05ef20254519f23cb2d15e287f5bc7a63e80792f52b8ed
|
7
|
+
data.tar.gz: 5ed2fb7fbc378ac89c21ac61588d5372c8006a39428a4aa09ed46c2284ab4bd61d72d5589f5f674279629e2d0d75effc2931850ed17398a1ff236c08715f0231
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if @result_model_name %>
|
2
|
+
if (responseMessage.resultCode == 0 && responseMessage.error == nil) {
|
3
|
+
if ([responseMessage.detailMsg isKindOfClass:[NSDictionary class]]) {
|
4
|
+
<%= @result_model_name %> *info = <%= @result_model_name %> yy_modelWithDictionary:responseMessage.detailMsg];
|
5
|
+
callback(info,responseMessage);
|
6
|
+
}
|
7
|
+
} else {
|
8
|
+
callback(nil,responseMessage);
|
9
|
+
}
|
10
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/**
|
2
|
+
* <%= @title %> -- <%= @username %>
|
3
|
+
* <%= @desc %>
|
4
|
+
*/
|
5
|
+
static NSString * const <%= @path_key %> = @"<%= @path %>";
|
6
|
+
|
7
|
+
<% if @method == 'GET' -%>
|
8
|
+
+(void)get<%= @path_name %>:(<%= @param_model_name %> *)param callback:(void (^)(<%= @result_model_name %> *model, MLResponseMessage *response))callback
|
9
|
+
{
|
10
|
+
[MLNetworkingManager getWithUrl:<%= @path_key %> params:params response:^(MLResponseMessage *responseMessage) {
|
11
|
+
<%= @model_template %>
|
12
|
+
}];
|
13
|
+
}
|
14
|
+
<% elsif @method == 'JSON' -%>
|
15
|
+
+(void)postJson<%= @path_name %>:(<%= @param_model_name %> *)param callback:(void (^)(<%= @result_model_name %> *model, MLResponseMessage *response))callback
|
16
|
+
{
|
17
|
+
[MLNetworkingManager requestJsonWithUrl:<%= @path_key %> httpMedth:kRequestMethodPOST params:param response:^(MLResponseMessage *responseMessage) {
|
18
|
+
<%= @model_template %>
|
19
|
+
}];
|
20
|
+
}
|
21
|
+
<% else -%>
|
22
|
+
+(void)postJson<%= @path_name %>:(<%= @param_model_name %> *)param callback:(void (^)(<%= @result_model_name %> *model, MLResponseMessage *response))callback
|
23
|
+
{
|
24
|
+
[MLNetworkingManager postWithUrl:<%= @path_key %> params:params response:^(MLResponseMessage *response) {
|
25
|
+
<%= @model_template %>
|
26
|
+
}];
|
27
|
+
}
|
28
|
+
<% end -%>
|
data/lib/lhj/tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhj-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lihaijian
|
@@ -300,6 +300,8 @@ files:
|
|
300
300
|
- lib/lhj/command/yapi/formatters/base.rb
|
301
301
|
- lib/lhj/command/yapi/formatters/command_context.rb
|
302
302
|
- lib/lhj/command/yapi/formatters/service.rb
|
303
|
+
- lib/lhj/command/yapi/formatters/template/model.erb
|
304
|
+
- lib/lhj/command/yapi/formatters/template/yapi.erb
|
303
305
|
- lib/lhj/config.rb
|
304
306
|
- lib/lhj/helper/local_config.rb
|
305
307
|
- lib/lhj/helper/oss_config.rb
|