jpsclient 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/bin/jpsclient +28 -0
  4. data/lib/jpsclient/api/app_level.rb +138 -0
  5. data/lib/jpsclient/api/app_resource.rb +164 -0
  6. data/lib/jpsclient/api/app_resource_version.rb +52 -0
  7. data/lib/jpsclient/api/apple_account.rb +140 -0
  8. data/lib/jpsclient/api/application.rb +268 -0
  9. data/lib/jpsclient/api/application_category.rb +120 -0
  10. data/lib/jpsclient/api/application_design.rb +118 -0
  11. data/lib/jpsclient/api/application_income.rb +54 -0
  12. data/lib/jpsclient/api/application_sales.rb +52 -0
  13. data/lib/jpsclient/api/application_version.rb +77 -0
  14. data/lib/jpsclient/api/assets_category.rb +120 -0
  15. data/lib/jpsclient/api/bug.rb +140 -0
  16. data/lib/jpsclient/api/cert.rb +27 -0
  17. data/lib/jpsclient/api/client.rb +268 -0
  18. data/lib/jpsclient/api/collect.rb +52 -0
  19. data/lib/jpsclient/api/collection.rb +162 -0
  20. data/lib/jpsclient/api/commit_log.rb +104 -0
  21. data/lib/jpsclient/api/creative.rb +52 -0
  22. data/lib/jpsclient/api/custom_application.rb +230 -0
  23. data/lib/jpsclient/api/custom_application_web.rb +52 -0
  24. data/lib/jpsclient/api/document_text.rb +30 -0
  25. data/lib/jpsclient/api/experience.rb +143 -0
  26. data/lib/jpsclient/api/experience_category.rb +97 -0
  27. data/lib/jpsclient/api/fgui_export.rb +52 -0
  28. data/lib/jpsclient/api/file.rb +84 -0
  29. data/lib/jpsclient/api/game_assets.rb +140 -0
  30. data/lib/jpsclient/api/healthy.rb +30 -0
  31. data/lib/jpsclient/api/icon_and_snapshot.rb +54 -0
  32. data/lib/jpsclient/api/idea.rb +121 -0
  33. data/lib/jpsclient/api/jssdk.rb +30 -0
  34. data/lib/jpsclient/api/lark_bitable.rb +30 -0
  35. data/lib/jpsclient/api/lark_chat_group.rb +30 -0
  36. data/lib/jpsclient/api/lark_comment.rb +118 -0
  37. data/lib/jpsclient/api/lark_task.rb +140 -0
  38. data/lib/jpsclient/api/lark_task_list.rb +118 -0
  39. data/lib/jpsclient/api/lark_task_section.rb +74 -0
  40. data/lib/jpsclient/api/lark_user.rb +30 -0
  41. data/lib/jpsclient/api/lark_wiki_node.rb +30 -0
  42. data/lib/jpsclient/api/lark_wiki_space.rb +30 -0
  43. data/lib/jpsclient/api/lazy_client.rb +290 -0
  44. data/lib/jpsclient/api/login.rb +96 -0
  45. data/lib/jpsclient/api/m3u8.rb +30 -0
  46. data/lib/jpsclient/api/menu.rb +143 -0
  47. data/lib/jpsclient/api/modular_client.rb +228 -0
  48. data/lib/jpsclient/api/project.rb +46 -0
  49. data/lib/jpsclient/api/project_package.rb +249 -0
  50. data/lib/jpsclient/api/publisher.rb +165 -0
  51. data/lib/jpsclient/api/publisher_category.rb +142 -0
  52. data/lib/jpsclient/api/publisher_group.rb +118 -0
  53. data/lib/jpsclient/api/publisher_group_category.rb +120 -0
  54. data/lib/jpsclient/api/requirements.rb +143 -0
  55. data/lib/jpsclient/api/requirements_category.rb +97 -0
  56. data/lib/jpsclient/api/resource_category.rb +120 -0
  57. data/lib/jpsclient/api/role.rb +165 -0
  58. data/lib/jpsclient/api/simple_search.rb +162 -0
  59. data/lib/jpsclient/api/sketch.rb +74 -0
  60. data/lib/jpsclient/api/sketch_category.rb +97 -0
  61. data/lib/jpsclient/api/sov.rb +30 -0
  62. data/lib/jpsclient/api/statistics.rb +30 -0
  63. data/lib/jpsclient/api/store.rb +30 -0
  64. data/lib/jpsclient/api/survey.rb +143 -0
  65. data/lib/jpsclient/api/survey_category.rb +97 -0
  66. data/lib/jpsclient/api/tag.rb +142 -0
  67. data/lib/jpsclient/api/tool.rb +121 -0
  68. data/lib/jpsclient/api/tool_category.rb +120 -0
  69. data/lib/jpsclient/api/trending.rb +30 -0
  70. data/lib/jpsclient/api/ud_id.rb +118 -0
  71. data/lib/jpsclient/api/user.rb +99 -0
  72. data/lib/jpsclient/api/util.rb +30 -0
  73. data/lib/jpsclient/api/video_cover.rb +30 -0
  74. data/lib/jpsclient/api/webhook.rb +118 -0
  75. data/lib/jpsclient/api/workflow.rb +118 -0
  76. data/lib/jpsclient/auth/auth.rb +676 -0
  77. data/lib/jpsclient/auth/token.rb +209 -0
  78. data/lib/jpsclient/base/api_config.rb +225 -0
  79. data/lib/jpsclient/base/exception.rb +5 -0
  80. data/lib/jpsclient/http/http_client.rb +148 -0
  81. data/lib/jpsclient/upload/upload_client.rb +334 -0
  82. data/lib/jpsclient/upload/upload_config.rb +128 -0
  83. data/lib/jpsclient/upload/upload_progress.rb +73 -0
  84. data/lib/jpsclient/utils/aes.rb +49 -0
  85. data/lib/jpsclient/utils/logger.rb +38 -0
  86. data/lib/jpsclient/version.rb +3 -0
  87. data/lib/jpsclient.rb +34 -0
  88. metadata +269 -0
@@ -0,0 +1,121 @@
1
+ module JPSClient
2
+ module API
3
+ # Idea 相关 API
4
+ # 自动生成的模块,处理 idea 相关接口
5
+ module Idea
6
+
7
+ # Get Idea Detail
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def get_idea_detail(ideaId:, params: {})
12
+ config = @request_config && @request_config["idea_idea_detail"]
13
+ raise JPSClient::ExceptionError, "Missing config for idea_idea_detail" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+ path = path.gsub("{ideaId}", ideaId.to_s)
17
+
18
+ response = @http_client.get(path, params: params)
19
+ result = JPSClient::Response.new(response)
20
+
21
+ if result.need_login?
22
+ do_login(force_login: true)
23
+ response = @http_client.get(path, params: params)
24
+ result = JPSClient::Response.new(response)
25
+ end
26
+
27
+ return result.to_h
28
+ end
29
+
30
+ # Update Idea
31
+ #
32
+ # @param params [Hash] 请求参数
33
+ # @return [Hash] API响应
34
+ def update_idea(ideaId:, params: {})
35
+ config = @request_config && @request_config["idea_idea"]
36
+ raise JPSClient::ExceptionError, "Missing config for idea_idea" unless config && config["url"]
37
+
38
+ path = config["url"]
39
+ path = path.gsub("{ideaId}", ideaId.to_s)
40
+
41
+ response = @http_client.put(path, body: params)
42
+ result = JPSClient::Response.new(response)
43
+
44
+ if result.need_login?
45
+ do_login(force_login: true)
46
+ response = @http_client.put(path, body: params)
47
+ result = JPSClient::Response.new(response)
48
+ end
49
+
50
+ return result.to_h
51
+ end
52
+
53
+ # Delete Idea
54
+ #
55
+ # @param params [Hash] 请求参数
56
+ # @return [Hash] API响应
57
+ def delete_idea(ideaId:, params: {})
58
+ config = @request_config && @request_config["idea_idea"]
59
+ raise JPSClient::ExceptionError, "Missing config for idea_idea" unless config && config["url"]
60
+
61
+ path = config["url"]
62
+ path = path.gsub("{ideaId}", ideaId.to_s)
63
+
64
+ response = @http_client.delete(path)
65
+ result = JPSClient::Response.new(response)
66
+
67
+ if result.need_login?
68
+ do_login(force_login: true)
69
+ response = @http_client.delete(path)
70
+ result = JPSClient::Response.new(response)
71
+ end
72
+
73
+ return result.to_h
74
+ end
75
+
76
+ # Create Ideas
77
+ #
78
+ # @param params [Hash] 请求参数
79
+ # @return [Hash] API响应
80
+ def create_ideas(params: {})
81
+ config = @request_config && @request_config["idea_ideas"]
82
+ raise JPSClient::ExceptionError, "Missing config for idea_ideas" unless config && config["url"]
83
+
84
+ path = config["url"]
85
+
86
+ response = @http_client.post(path, body: params)
87
+ result = JPSClient::Response.new(response)
88
+
89
+ if result.need_login?
90
+ do_login(force_login: true)
91
+ response = @http_client.post(path, body: params)
92
+ result = JPSClient::Response.new(response)
93
+ end
94
+
95
+ return result.to_h
96
+ end
97
+
98
+ # Create Idea
99
+ #
100
+ # @param params [Hash] 请求参数
101
+ # @return [Hash] API响应
102
+ def create_idea(params: {})
103
+ config = @request_config && @request_config["idea_idea"]
104
+ raise JPSClient::ExceptionError, "Missing config for idea_idea" unless config && config["url"]
105
+
106
+ path = config["url"]
107
+
108
+ response = @http_client.post(path, body: params)
109
+ result = JPSClient::Response.new(response)
110
+
111
+ if result.need_login?
112
+ do_login(force_login: true)
113
+ response = @http_client.post(path, body: params)
114
+ result = JPSClient::Response.new(response)
115
+ end
116
+
117
+ return result.to_h
118
+ end
119
+ end
120
+ end
121
+ end
@@ -0,0 +1,30 @@
1
+ module JPSClient
2
+ module API
3
+ # Jssdk 相关 API
4
+ # 自动生成的模块,处理 jssdk 相关接口
5
+ module Jssdk
6
+
7
+ # Get Auth
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def get_auth(params: {})
12
+ config = @request_config && @request_config["jssdk_auth"]
13
+ raise JPSClient::ExceptionError, "Missing config for jssdk_auth" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.get(path, params: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.get(path, params: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ module JPSClient
2
+ module API
3
+ # LarkBitable 相关 API
4
+ # 自动生成的模块,处理 lark_bitable 相关接口
5
+ module LarkBitable
6
+
7
+ # Create Create
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def create_create(params: {})
12
+ config = @request_config && @request_config["lark_bitable_create"]
13
+ raise JPSClient::ExceptionError, "Missing config for lark_bitable_create" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.post(path, body: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.post(path, body: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ module JPSClient
2
+ module API
3
+ # LarkChatGroup 相关 API
4
+ # 自动生成的模块,处理 lark_chat_group 相关接口
5
+ module LarkChatGroup
6
+
7
+ # Get Search
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def get_search(params: {})
12
+ config = @request_config && @request_config["lark_chat_group_search"]
13
+ raise JPSClient::ExceptionError, "Missing config for lark_chat_group_search" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.get(path, params: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.get(path, params: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,118 @@
1
+ module JPSClient
2
+ module API
3
+ # LarkComment 相关 API
4
+ # 自动生成的模块,处理 lark_comment 相关接口
5
+ module LarkComment
6
+
7
+ # Create Update
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def create_update(params: {})
12
+ config = @request_config && @request_config["lark_comment_update"]
13
+ raise JPSClient::ExceptionError, "Missing config for lark_comment_update" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.post(path, body: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.post(path, body: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+
29
+ # Create Sync
30
+ #
31
+ # @param params [Hash] 请求参数
32
+ # @return [Hash] API响应
33
+ def create_sync(params: {})
34
+ config = @request_config && @request_config["lark_comment_sync"]
35
+ raise JPSClient::ExceptionError, "Missing config for lark_comment_sync" unless config && config["url"]
36
+
37
+ path = config["url"]
38
+
39
+ response = @http_client.post(path, body: params)
40
+ result = JPSClient::Response.new(response)
41
+
42
+ if result.need_login?
43
+ do_login(force_login: true)
44
+ response = @http_client.post(path, body: params)
45
+ result = JPSClient::Response.new(response)
46
+ end
47
+
48
+ return result.to_h
49
+ end
50
+
51
+ # Create Delete
52
+ #
53
+ # @param params [Hash] 请求参数
54
+ # @return [Hash] API响应
55
+ def create_delete(params: {})
56
+ config = @request_config && @request_config["lark_comment_delete"]
57
+ raise JPSClient::ExceptionError, "Missing config for lark_comment_delete" unless config && config["url"]
58
+
59
+ path = config["url"]
60
+
61
+ response = @http_client.post(path, body: params)
62
+ result = JPSClient::Response.new(response)
63
+
64
+ if result.need_login?
65
+ do_login(force_login: true)
66
+ response = @http_client.post(path, body: params)
67
+ result = JPSClient::Response.new(response)
68
+ end
69
+
70
+ return result.to_h
71
+ end
72
+
73
+ # Create Create
74
+ #
75
+ # @param params [Hash] 请求参数
76
+ # @return [Hash] API响应
77
+ def create_create(params: {})
78
+ config = @request_config && @request_config["lark_comment_create"]
79
+ raise JPSClient::ExceptionError, "Missing config for lark_comment_create" unless config && config["url"]
80
+
81
+ path = config["url"]
82
+
83
+ response = @http_client.post(path, body: params)
84
+ result = JPSClient::Response.new(response)
85
+
86
+ if result.need_login?
87
+ do_login(force_login: true)
88
+ response = @http_client.post(path, body: params)
89
+ result = JPSClient::Response.new(response)
90
+ end
91
+
92
+ return result.to_h
93
+ end
94
+
95
+ # Get List
96
+ #
97
+ # @param params [Hash] 请求参数
98
+ # @return [Hash] API响应
99
+ def get_list(params: {})
100
+ config = @request_config && @request_config["lark_comment_list"]
101
+ raise JPSClient::ExceptionError, "Missing config for lark_comment_list" unless config && config["url"]
102
+
103
+ path = config["url"]
104
+
105
+ response = @http_client.get(path, params: params)
106
+ result = JPSClient::Response.new(response)
107
+
108
+ if result.need_login?
109
+ do_login(force_login: true)
110
+ response = @http_client.get(path, params: params)
111
+ result = JPSClient::Response.new(response)
112
+ end
113
+
114
+ return result.to_h
115
+ end
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,140 @@
1
+ module JPSClient
2
+ module API
3
+ # LarkTask 相关 API
4
+ # 自动生成的模块,处理 lark_task 相关接口
5
+ module LarkTask
6
+
7
+ # Create Update
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def create_update(params: {})
12
+ config = @request_config && @request_config["lark_task_update"]
13
+ raise JPSClient::ExceptionError, "Missing config for lark_task_update" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.post(path, body: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.post(path, body: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+
29
+ # Get List
30
+ #
31
+ # @param params [Hash] 请求参数
32
+ # @return [Hash] API响应
33
+ def get_list(params: {})
34
+ config = @request_config && @request_config["lark_task_list"]
35
+ raise JPSClient::ExceptionError, "Missing config for lark_task_list" unless config && config["url"]
36
+
37
+ path = config["url"]
38
+
39
+ response = @http_client.post(path, body: params)
40
+ result = JPSClient::Response.new(response)
41
+
42
+ if result.need_login?
43
+ do_login(force_login: true)
44
+ response = @http_client.post(path, body: params)
45
+ result = JPSClient::Response.new(response)
46
+ end
47
+
48
+ return result.to_h
49
+ end
50
+
51
+ # Create Delete
52
+ #
53
+ # @param params [Hash] 请求参数
54
+ # @return [Hash] API响应
55
+ def create_delete(params: {})
56
+ config = @request_config && @request_config["lark_task_delete"]
57
+ raise JPSClient::ExceptionError, "Missing config for lark_task_delete" unless config && config["url"]
58
+
59
+ path = config["url"]
60
+
61
+ response = @http_client.post(path, body: params)
62
+ result = JPSClient::Response.new(response)
63
+
64
+ if result.need_login?
65
+ do_login(force_login: true)
66
+ response = @http_client.post(path, body: params)
67
+ result = JPSClient::Response.new(response)
68
+ end
69
+
70
+ return result.to_h
71
+ end
72
+
73
+ # Create Create
74
+ #
75
+ # @param params [Hash] 请求参数
76
+ # @return [Hash] API响应
77
+ def create_create(params: {})
78
+ config = @request_config && @request_config["lark_task_create"]
79
+ raise JPSClient::ExceptionError, "Missing config for lark_task_create" unless config && config["url"]
80
+
81
+ path = config["url"]
82
+
83
+ response = @http_client.post(path, body: params)
84
+ result = JPSClient::Response.new(response)
85
+
86
+ if result.need_login?
87
+ do_login(force_login: true)
88
+ response = @http_client.post(path, body: params)
89
+ result = JPSClient::Response.new(response)
90
+ end
91
+
92
+ return result.to_h
93
+ end
94
+
95
+ # Get Type Info List
96
+ #
97
+ # @param params [Hash] 请求参数
98
+ # @return [Hash] API响应
99
+ def get_type_info_list(params: {})
100
+ config = @request_config && @request_config["lark_task_type_info_list"]
101
+ raise JPSClient::ExceptionError, "Missing config for lark_task_type_info_list" unless config && config["url"]
102
+
103
+ path = config["url"]
104
+
105
+ response = @http_client.get(path, params: params)
106
+ result = JPSClient::Response.new(response)
107
+
108
+ if result.need_login?
109
+ do_login(force_login: true)
110
+ response = @http_client.get(path, params: params)
111
+ result = JPSClient::Response.new(response)
112
+ end
113
+
114
+ return result.to_h
115
+ end
116
+
117
+ # Get Detail
118
+ #
119
+ # @param params [Hash] 请求参数
120
+ # @return [Hash] API响应
121
+ def get_detail(params: {})
122
+ config = @request_config && @request_config["lark_task_detail"]
123
+ raise JPSClient::ExceptionError, "Missing config for lark_task_detail" unless config && config["url"]
124
+
125
+ path = config["url"]
126
+
127
+ response = @http_client.get(path, params: params)
128
+ result = JPSClient::Response.new(response)
129
+
130
+ if result.need_login?
131
+ do_login(force_login: true)
132
+ response = @http_client.get(path, params: params)
133
+ result = JPSClient::Response.new(response)
134
+ end
135
+
136
+ return result.to_h
137
+ end
138
+ end
139
+ end
140
+ end
@@ -0,0 +1,118 @@
1
+ module JPSClient
2
+ module API
3
+ # LarkTaskList 相关 API
4
+ # 自动生成的模块,处理 lark_task_list 相关接口
5
+ module LarkTaskList
6
+
7
+ # Get Delete
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def get_delete(params: {})
12
+ config = @request_config && @request_config["lark_task_list_delete"]
13
+ raise JPSClient::ExceptionError, "Missing config for lark_task_list_delete" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.post(path, body: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.post(path, body: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+
29
+ # Get Create
30
+ #
31
+ # @param params [Hash] 请求参数
32
+ # @return [Hash] API响应
33
+ def get_create(params: {})
34
+ config = @request_config && @request_config["lark_task_list_create"]
35
+ raise JPSClient::ExceptionError, "Missing config for lark_task_list_create" unless config && config["url"]
36
+
37
+ path = config["url"]
38
+
39
+ response = @http_client.post(path, body: params)
40
+ result = JPSClient::Response.new(response)
41
+
42
+ if result.need_login?
43
+ do_login(force_login: true)
44
+ response = @http_client.post(path, body: params)
45
+ result = JPSClient::Response.new(response)
46
+ end
47
+
48
+ return result.to_h
49
+ end
50
+
51
+ # Get List
52
+ #
53
+ # @param params [Hash] 请求参数
54
+ # @return [Hash] API响应
55
+ def get_list(params: {})
56
+ config = @request_config && @request_config["lark_task_list_list"]
57
+ raise JPSClient::ExceptionError, "Missing config for lark_task_list_list" unless config && config["url"]
58
+
59
+ path = config["url"]
60
+
61
+ response = @http_client.get(path, params: params)
62
+ result = JPSClient::Response.new(response)
63
+
64
+ if result.need_login?
65
+ do_login(force_login: true)
66
+ response = @http_client.get(path, params: params)
67
+ result = JPSClient::Response.new(response)
68
+ end
69
+
70
+ return result.to_h
71
+ end
72
+
73
+ # Get Custom Fields
74
+ #
75
+ # @param params [Hash] 请求参数
76
+ # @return [Hash] API响应
77
+ def get_custom_fields(params: {})
78
+ config = @request_config && @request_config["lark_task_list_custom_fields"]
79
+ raise JPSClient::ExceptionError, "Missing config for lark_task_list_custom_fields" unless config && config["url"]
80
+
81
+ path = config["url"]
82
+
83
+ response = @http_client.get(path, params: params)
84
+ result = JPSClient::Response.new(response)
85
+
86
+ if result.need_login?
87
+ do_login(force_login: true)
88
+ response = @http_client.get(path, params: params)
89
+ result = JPSClient::Response.new(response)
90
+ end
91
+
92
+ return result.to_h
93
+ end
94
+
95
+ # Get All
96
+ #
97
+ # @param params [Hash] 请求参数
98
+ # @return [Hash] API响应
99
+ def get_all(params: {})
100
+ config = @request_config && @request_config["lark_task_list_all"]
101
+ raise JPSClient::ExceptionError, "Missing config for lark_task_list_all" unless config && config["url"]
102
+
103
+ path = config["url"]
104
+
105
+ response = @http_client.get(path, params: params)
106
+ result = JPSClient::Response.new(response)
107
+
108
+ if result.need_login?
109
+ do_login(force_login: true)
110
+ response = @http_client.get(path, params: params)
111
+ result = JPSClient::Response.new(response)
112
+ end
113
+
114
+ return result.to_h
115
+ end
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,74 @@
1
+ module JPSClient
2
+ module API
3
+ # LarkTaskSection 相关 API
4
+ # 自动生成的模块,处理 lark_task_section 相关接口
5
+ module LarkTaskSection
6
+
7
+ # Create Create
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def create_create(params: {})
12
+ config = @request_config && @request_config["lark_task_section_create"]
13
+ raise JPSClient::ExceptionError, "Missing config for lark_task_section_create" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.post(path, body: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.post(path, body: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+
29
+ # Get List
30
+ #
31
+ # @param params [Hash] 请求参数
32
+ # @return [Hash] API响应
33
+ def get_list(params: {})
34
+ config = @request_config && @request_config["lark_task_section_list"]
35
+ raise JPSClient::ExceptionError, "Missing config for lark_task_section_list" unless config && config["url"]
36
+
37
+ path = config["url"]
38
+
39
+ response = @http_client.get(path, params: params)
40
+ result = JPSClient::Response.new(response)
41
+
42
+ if result.need_login?
43
+ do_login(force_login: true)
44
+ response = @http_client.get(path, params: params)
45
+ result = JPSClient::Response.new(response)
46
+ end
47
+
48
+ return result.to_h
49
+ end
50
+
51
+ # Get Detail
52
+ #
53
+ # @param params [Hash] 请求参数
54
+ # @return [Hash] API响应
55
+ def get_detail(params: {})
56
+ config = @request_config && @request_config["lark_task_section_detail"]
57
+ raise JPSClient::ExceptionError, "Missing config for lark_task_section_detail" unless config && config["url"]
58
+
59
+ path = config["url"]
60
+
61
+ response = @http_client.get(path, params: params)
62
+ result = JPSClient::Response.new(response)
63
+
64
+ if result.need_login?
65
+ do_login(force_login: true)
66
+ response = @http_client.get(path, params: params)
67
+ result = JPSClient::Response.new(response)
68
+ end
69
+
70
+ return result.to_h
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,30 @@
1
+ module JPSClient
2
+ module API
3
+ # LarkUser 相关 API
4
+ # 自动生成的模块,处理 lark_user 相关接口
5
+ module LarkUser
6
+
7
+ # Get List
8
+ #
9
+ # @param params [Hash] 请求参数
10
+ # @return [Hash] API响应
11
+ def get_list(params: {})
12
+ config = @request_config && @request_config["lark_user_list"]
13
+ raise JPSClient::ExceptionError, "Missing config for lark_user_list" unless config && config["url"]
14
+
15
+ path = config["url"]
16
+
17
+ response = @http_client.get(path, params: params)
18
+ result = JPSClient::Response.new(response)
19
+
20
+ if result.need_login?
21
+ do_login(force_login: true)
22
+ response = @http_client.get(path, params: params)
23
+ result = JPSClient::Response.new(response)
24
+ end
25
+
26
+ return result.to_h
27
+ end
28
+ end
29
+ end
30
+ end