cfan122 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cfan122/operation.rb +7 -5
- data/lib/cfan122/operation_methods.rb +1 -1
- data/lib/cfan122/operations/exam_agency.rb +1 -2
- data/lib/cfan122/operations/exam_location.rb +1 -2
- data/lib/cfan122/operations/exam_plan_detail.rb +5 -6
- data/lib/cfan122/operations/exam_plan_list.rb +1 -2
- data/lib/cfan122/operations/exam_plan_result.rb +1 -2
- data/lib/cfan122/operations/exam_subject.rb +1 -2
- data/lib/cfan122/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7952665fc6a379c6471861f7a785ce7b7a6d1ac0
|
4
|
+
data.tar.gz: 3bb7568a433097cd66dd3731569cb19bd14d2b68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e13544b97204297ddee0de1419d553b06fce74e15a4decdacae2653ecc29879b9ad57d5afa7ef96c21e18ab416fca4fee1e4a8cfd79dc83296ff04d68e59a3a
|
7
|
+
data.tar.gz: e86b660b0bbb05d821ae25e47a9d32c1ec96b414662eb4bdafc1544b232795e015777dd84f56d364568f218276553671d4970db7b3e3579aa66c09e57dda0381
|
data/Gemfile.lock
CHANGED
data/lib/cfan122/operation.rb
CHANGED
@@ -23,13 +23,15 @@ module Cfan122
|
|
23
23
|
attr_accessor :body, :response, :impersonation_user
|
24
24
|
|
25
25
|
def initialize params = {}
|
26
|
-
|
27
|
-
self.attributes = params
|
26
|
+
set_default
|
28
27
|
set_base_uri province
|
28
|
+
self.attributes = params
|
29
|
+
set_request_params
|
29
30
|
end
|
30
31
|
|
31
|
-
def
|
32
|
-
|
32
|
+
def set_default; end
|
33
|
+
|
34
|
+
def set_request_params; end
|
33
35
|
|
34
36
|
def execute
|
35
37
|
raise NotImplemented
|
@@ -56,7 +58,7 @@ module Cfan122
|
|
56
58
|
end
|
57
59
|
|
58
60
|
def to_json
|
59
|
-
JSON.parse(response.body)
|
61
|
+
response.body.blank? ? {} : JSON.parse(response.body)
|
60
62
|
end
|
61
63
|
|
62
64
|
end
|
@@ -4,25 +4,24 @@ module Cfan122
|
|
4
4
|
|
5
5
|
class ExamPlanDetail < Operation
|
6
6
|
class Request < Operation::Request
|
7
|
-
PARAMS = [:startTime, :endTime, :fzjg, :kscx, :ksdd, :kskm, :zt]
|
7
|
+
PARAMS = [:startTime, :endTime, :fzjg, :kscx, :ksdd, :kskm, :page, :size, :zt]
|
8
8
|
attr_accessor *PARAMS
|
9
9
|
include HttpConfig
|
10
10
|
include OperationMethods
|
11
11
|
|
12
12
|
def execute params = {}
|
13
13
|
options = attributes.merge(params)
|
14
|
-
self.class.post('/m/examplan/
|
14
|
+
self.class.post('/m/examplan/getExamPlanResult', body: to_params(options))
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
|
-
def
|
19
|
-
set_default
|
18
|
+
def set_request_params
|
20
19
|
self.attributes = {
|
21
20
|
startTime: Date.today,
|
22
21
|
endTime: Date.today + 1.year,
|
23
22
|
fzjg: city, kscx: type,
|
24
23
|
ksdd: location, kskm: subject,
|
25
|
-
zt: 2
|
24
|
+
page: 1, size: 99, zt: 2
|
26
25
|
}
|
27
26
|
end
|
28
27
|
|
@@ -30,7 +29,7 @@ module Cfan122
|
|
30
29
|
|
31
30
|
class Response < Operation::Response
|
32
31
|
def body
|
33
|
-
to_json['data']
|
32
|
+
to_json['data']
|
34
33
|
end
|
35
34
|
end
|
36
35
|
end
|
data/lib/cfan122/version.rb
CHANGED