cfan122 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 005fb2991ddffbebbb6397b2663a15a570551d07
4
- data.tar.gz: 7b30d3471096b495505926ff6ed0a894d48c9d3f
3
+ metadata.gz: 3db4f4f55041182f376e4e83499de27ad7175c87
4
+ data.tar.gz: 015dbf3d149b876c25c2443cb75698ebec67c9aa
5
5
  SHA512:
6
- metadata.gz: bf86b634b672c2a52c37fd9c529cf968b3c46c3afbb5498a1cd1ab7a11694b3188e39275ef88b937ccbc20a08a141093f0536ba5d1d02961f6fb98cdebc27d6e
7
- data.tar.gz: dd579f64bc6b30c60e7da26996aff909aacbebf849b3ec1ddf858c5b4c9e3c6a6313b5701edf0a19ec938207d47e68d366196bfcf82cdc27b35013e628307590
6
+ metadata.gz: bd0d2db5553f3f364b6e72416a8d3998bb9895e8f82a516e6531ae765521fa859f1bd5113f360b86504f75ee301ac2e70c5eec7ad382aac460d7b682ff326d7e
7
+ data.tar.gz: 9ddd95b6855b308bed3f7711120d6da5da1f9ac37e2d8c686eedefc54e5d776964f0cb6ededd7e6b30fbf610e1284b5ef77e90acd9c955dc64fdeab5b4263d92
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cfan122 (0.1.1)
4
+ cfan122 (0.1.2)
5
5
  activesupport (~> 5.0)
6
6
  httparty (~> 0.14)
7
7
  jsonpath (~> 0.5.8)
@@ -15,6 +15,7 @@ require "cfan122/operations/exam_agency"
15
15
  require "cfan122/operations/exam_plan_list"
16
16
  require "cfan122/operations/exam_plan_detail"
17
17
  require "cfan122/operations/exam_plan_result"
18
+ require "cfan122/operations/exam_student_list"
18
19
  require "cfan122/yaml_generator"
19
20
  require "cfan122/version"
20
21
 
@@ -4,14 +4,14 @@ module Cfan122
4
4
 
5
5
  class ExamPlanDetail < Operation
6
6
  class Request < Operation::Request
7
- PARAMS = [:startTime, :endTime, :fzjg, :kscx, :ksdd, :kskm, :page, :size, :zt]
7
+ PARAMS = [:startTime, :endTime, :fzjg, :kscx, :ksdd, :kskm, :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/getExamPlanResult', body: to_params(options))
14
+ self.class.post('/m/examplan/getExamPlanDetail', body: to_params(options))
15
15
  end
16
16
 
17
17
  private
@@ -21,7 +21,7 @@ module Cfan122
21
21
  endTime: Date.today + 1.year,
22
22
  fzjg: city, kscx: type,
23
23
  ksdd: location, kskm: subject,
24
- page: 1, size: 99, zt: 2
24
+ size: 99, zt: 0
25
25
  }
26
26
  end
27
27
 
@@ -21,14 +21,14 @@ module Cfan122
21
21
  endTime: Date.today + 1.year,
22
22
  fzjg: city, kscx: type,
23
23
  ksdd: location, kskm: subject,
24
- page: page, zt: 2
24
+ page: page, zt: 0
25
25
  }
26
26
  end
27
27
  end
28
28
 
29
29
  class Response < Operation::Response
30
30
  def body
31
- to_json['data'][0]
31
+ to_json['data']
32
32
  end
33
33
  end
34
34
  end
@@ -4,24 +4,29 @@ module Cfan122
4
4
 
5
5
  class ExamPlanResult < Operation
6
6
  class Request < Operation::Request
7
- PARAMS = [:xh, :page, :size]
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/getStudentInfo', body: to_params(options))
14
+ self.class.post('/m/examplan/getExamPlanResult', body: to_params(options))
15
15
  end
16
16
 
17
17
  private
18
18
  def set_request_params
19
- self.attributes = {page: 1, size: 99999}
19
+ self.attributes = {
20
+ startTime: Date.today,
21
+ endTime: Date.today + 1.year,
22
+ fzjg: city, kscx: type,
23
+ ksdd: location, kskm: subject,
24
+ page: 1, size: 99, zt: 0
25
+ }
20
26
  end
21
27
  end
22
28
 
23
29
  class Response < Operation::Response
24
-
25
30
  def body
26
31
  to_json['data']
27
32
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cfan122
4
+
5
+ class ExamStudentList < Operation
6
+ class Request < Operation::Request
7
+ PARAMS = [:xh, :page, :size]
8
+ attr_accessor *PARAMS
9
+ include HttpConfig
10
+ include OperationMethods
11
+
12
+ def execute params = {}
13
+ options = attributes.merge(params)
14
+ self.class.post('/m/examplan/getStudentInfo', body: to_params(options))
15
+ end
16
+
17
+ private
18
+ def set_request_params
19
+ self.attributes = {page: 1, size: 99999}
20
+ end
21
+ end
22
+
23
+ class Response < Operation::Response
24
+
25
+ def body
26
+ to_json['data']
27
+ end
28
+ end
29
+ end
30
+
31
+ end
@@ -1,3 +1,3 @@
1
1
  module Cfan122
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfan122
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - cfanbase
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-11 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonpath
@@ -163,6 +163,7 @@ files:
163
163
  - lib/cfan122/operations/exam_plan_detail.rb
164
164
  - lib/cfan122/operations/exam_plan_list.rb
165
165
  - lib/cfan122/operations/exam_plan_result.rb
166
+ - lib/cfan122/operations/exam_student_list.rb
166
167
  - lib/cfan122/operations/exam_subject.rb
167
168
  - lib/cfan122/version.rb
168
169
  - lib/cfan122/yaml_generator.rb