clever-ruby 1.0.0 → 1.1.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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +78 -46
  4. data/clever-ruby-1.0.0.gem +0 -0
  5. data/docs/Credentials.md +8 -0
  6. data/docs/DataApi.md +130 -127
  7. data/docs/District.md +1 -1
  8. data/docs/DistrictAdmin.md +2 -2
  9. data/docs/DistrictStatus.md +5 -5
  10. data/docs/DistrictsCreated.md +2 -1
  11. data/docs/DistrictsDeleted.md +2 -1
  12. data/docs/DistrictsUpdated.md +2 -1
  13. data/docs/Event.md +2 -1
  14. data/docs/EventsApi.md +14 -21
  15. data/docs/Location.md +2 -2
  16. data/docs/Name.md +1 -1
  17. data/docs/Principal.md +1 -1
  18. data/docs/School.md +2 -2
  19. data/docs/SchoolAdmin.md +2 -1
  20. data/docs/SchooladminsCreated.md +2 -1
  21. data/docs/SchooladminsDeleted.md +2 -1
  22. data/docs/SchooladminsUpdated.md +2 -1
  23. data/docs/SchoolsCreated.md +2 -1
  24. data/docs/SchoolsDeleted.md +2 -1
  25. data/docs/SchoolsUpdated.md +2 -1
  26. data/docs/Section.md +1 -1
  27. data/docs/SectionsCreated.md +2 -1
  28. data/docs/SectionsDeleted.md +2 -1
  29. data/docs/SectionsUpdated.md +2 -1
  30. data/docs/Student.md +2 -2
  31. data/docs/StudentContact.md +1 -1
  32. data/docs/StudentcontactsCreated.md +2 -1
  33. data/docs/StudentcontactsDeleted.md +2 -1
  34. data/docs/StudentcontactsUpdated.md +2 -1
  35. data/docs/StudentsCreated.md +2 -1
  36. data/docs/StudentsDeleted.md +2 -1
  37. data/docs/StudentsUpdated.md +2 -1
  38. data/docs/Teacher.md +2 -1
  39. data/docs/TeachersCreated.md +2 -1
  40. data/docs/TeachersDeleted.md +2 -1
  41. data/docs/TeachersUpdated.md +2 -1
  42. data/docs/Term.md +1 -1
  43. data/lib/clever-ruby.rb +1 -0
  44. data/lib/clever-ruby/api/data_api.rb +127 -85
  45. data/lib/clever-ruby/api/events_api.rb +14 -14
  46. data/lib/clever-ruby/models/credentials.rb +187 -0
  47. data/lib/clever-ruby/models/district.rb +13 -13
  48. data/lib/clever-ruby/models/district_admin.rb +22 -22
  49. data/lib/clever-ruby/models/district_status.rb +70 -37
  50. data/lib/clever-ruby/models/event.rb +19 -10
  51. data/lib/clever-ruby/models/location.rb +22 -22
  52. data/lib/clever-ruby/models/name.rb +13 -13
  53. data/lib/clever-ruby/models/principal.rb +13 -13
  54. data/lib/clever-ruby/models/school.rb +66 -21
  55. data/lib/clever-ruby/models/school_admin.rb +16 -7
  56. data/lib/clever-ruby/models/section.rb +55 -10
  57. data/lib/clever-ruby/models/student.rb +100 -19
  58. data/lib/clever-ruby/models/student_contact.rb +10 -10
  59. data/lib/clever-ruby/models/teacher.rb +19 -10
  60. data/lib/clever-ruby/models/term.rb +13 -13
  61. data/lib/clever-ruby/version.rb +1 -1
  62. data/override/README-extension.md +31 -0
  63. data/override/config.json +1 -1
  64. data/override/override.sh +5 -0
  65. data/sample/sample.rb +1 -1
  66. metadata +6 -3
  67. data/instructions.md +0 -12
@@ -14,12 +14,12 @@ require 'date'
14
14
  module Clever
15
15
 
16
16
  class StudentContact
17
- attr_accessor :id
18
-
19
17
  attr_accessor :district
20
18
 
21
19
  attr_accessor :email
22
20
 
21
+ attr_accessor :id
22
+
23
23
  attr_accessor :name
24
24
 
25
25
  attr_accessor :phone
@@ -36,9 +36,9 @@ module Clever
36
36
  # Attribute mapping from ruby-style variable name to JSON key.
37
37
  def self.attribute_map
38
38
  {
39
- :'id' => :'id',
40
39
  :'district' => :'district',
41
40
  :'email' => :'email',
41
+ :'id' => :'id',
42
42
  :'name' => :'name',
43
43
  :'phone' => :'phone',
44
44
  :'phone_type' => :'phone_type',
@@ -51,9 +51,9 @@ module Clever
51
51
  # Attribute type mapping.
52
52
  def self.swagger_types
53
53
  {
54
- :'id' => :'String',
55
54
  :'district' => :'String',
56
55
  :'email' => :'String',
56
+ :'id' => :'String',
57
57
  :'name' => :'String',
58
58
  :'phone' => :'String',
59
59
  :'phone_type' => :'String',
@@ -71,10 +71,6 @@ module Clever
71
71
  # convert string to symbol for hash key
72
72
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
73
73
 
74
- if attributes.has_key?(:'id')
75
- self.id = attributes[:'id']
76
- end
77
-
78
74
  if attributes.has_key?(:'district')
79
75
  self.district = attributes[:'district']
80
76
  end
@@ -83,6 +79,10 @@ module Clever
83
79
  self.email = attributes[:'email']
84
80
  end
85
81
 
82
+ if attributes.has_key?(:'id')
83
+ self.id = attributes[:'id']
84
+ end
85
+
86
86
  if attributes.has_key?(:'name')
87
87
  self.name = attributes[:'name']
88
88
  end
@@ -127,9 +127,9 @@ module Clever
127
127
  def ==(o)
128
128
  return true if self.equal?(o)
129
129
  self.class == o.class &&
130
- id == o.id &&
131
130
  district == o.district &&
132
131
  email == o.email &&
132
+ id == o.id &&
133
133
  name == o.name &&
134
134
  phone == o.phone &&
135
135
  phone_type == o.phone_type &&
@@ -147,7 +147,7 @@ module Clever
147
147
  # Calculates hash code according to all attributes.
148
148
  # @return [Fixnum] Hash code
149
149
  def hash
150
- [id, district, email, name, phone, phone_type, relationship, student, type].hash
150
+ [district, email, id, name, phone, phone_type, relationship, student, type].hash
151
151
  end
152
152
 
153
153
  # Builds the object from hash
@@ -14,14 +14,16 @@ require 'date'
14
14
  module Clever
15
15
 
16
16
  class Teacher
17
- attr_accessor :id
18
-
19
17
  attr_accessor :created
20
18
 
19
+ attr_accessor :credentials
20
+
21
21
  attr_accessor :district
22
22
 
23
23
  attr_accessor :email
24
24
 
25
+ attr_accessor :id
26
+
25
27
  attr_accessor :last_modified
26
28
 
27
29
  attr_accessor :name
@@ -42,10 +44,11 @@ module Clever
42
44
  # Attribute mapping from ruby-style variable name to JSON key.
43
45
  def self.attribute_map
44
46
  {
45
- :'id' => :'id',
46
47
  :'created' => :'created',
48
+ :'credentials' => :'credentials',
47
49
  :'district' => :'district',
48
50
  :'email' => :'email',
51
+ :'id' => :'id',
49
52
  :'last_modified' => :'last_modified',
50
53
  :'name' => :'name',
51
54
  :'school' => :'school',
@@ -60,10 +63,11 @@ module Clever
60
63
  # Attribute type mapping.
61
64
  def self.swagger_types
62
65
  {
63
- :'id' => :'String',
64
66
  :'created' => :'String',
67
+ :'credentials' => :'Credentials',
65
68
  :'district' => :'String',
66
69
  :'email' => :'String',
70
+ :'id' => :'String',
67
71
  :'last_modified' => :'String',
68
72
  :'name' => :'Name',
69
73
  :'school' => :'String',
@@ -83,14 +87,14 @@ module Clever
83
87
  # convert string to symbol for hash key
84
88
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
85
89
 
86
- if attributes.has_key?(:'id')
87
- self.id = attributes[:'id']
88
- end
89
-
90
90
  if attributes.has_key?(:'created')
91
91
  self.created = attributes[:'created']
92
92
  end
93
93
 
94
+ if attributes.has_key?(:'credentials')
95
+ self.credentials = attributes[:'credentials']
96
+ end
97
+
94
98
  if attributes.has_key?(:'district')
95
99
  self.district = attributes[:'district']
96
100
  end
@@ -99,6 +103,10 @@ module Clever
99
103
  self.email = attributes[:'email']
100
104
  end
101
105
 
106
+ if attributes.has_key?(:'id')
107
+ self.id = attributes[:'id']
108
+ end
109
+
102
110
  if attributes.has_key?(:'last_modified')
103
111
  self.last_modified = attributes[:'last_modified']
104
112
  end
@@ -153,10 +161,11 @@ module Clever
153
161
  def ==(o)
154
162
  return true if self.equal?(o)
155
163
  self.class == o.class &&
156
- id == o.id &&
157
164
  created == o.created &&
165
+ credentials == o.credentials &&
158
166
  district == o.district &&
159
167
  email == o.email &&
168
+ id == o.id &&
160
169
  last_modified == o.last_modified &&
161
170
  name == o.name &&
162
171
  school == o.school &&
@@ -176,7 +185,7 @@ module Clever
176
185
  # Calculates hash code according to all attributes.
177
186
  # @return [Fixnum] Hash code
178
187
  def hash
179
- [id, created, district, email, last_modified, name, school, schools, sis_id, state_id, teacher_number, title].hash
188
+ [created, credentials, district, email, id, last_modified, name, school, schools, sis_id, state_id, teacher_number, title].hash
180
189
  end
181
190
 
182
191
  # Builds the object from hash
@@ -14,28 +14,28 @@ require 'date'
14
14
  module Clever
15
15
 
16
16
  class Term
17
+ attr_accessor :end_date
18
+
17
19
  attr_accessor :name
18
20
 
19
21
  attr_accessor :start_date
20
22
 
21
- attr_accessor :end_date
22
-
23
23
 
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
25
25
  def self.attribute_map
26
26
  {
27
+ :'end_date' => :'end_date',
27
28
  :'name' => :'name',
28
- :'start_date' => :'start_date',
29
- :'end_date' => :'end_date'
29
+ :'start_date' => :'start_date'
30
30
  }
31
31
  end
32
32
 
33
33
  # Attribute type mapping.
34
34
  def self.swagger_types
35
35
  {
36
+ :'end_date' => :'String',
36
37
  :'name' => :'String',
37
- :'start_date' => :'String',
38
- :'end_date' => :'String'
38
+ :'start_date' => :'String'
39
39
  }
40
40
  end
41
41
 
@@ -47,6 +47,10 @@ module Clever
47
47
  # convert string to symbol for hash key
48
48
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
49
49
 
50
+ if attributes.has_key?(:'end_date')
51
+ self.end_date = attributes[:'end_date']
52
+ end
53
+
50
54
  if attributes.has_key?(:'name')
51
55
  self.name = attributes[:'name']
52
56
  end
@@ -55,10 +59,6 @@ module Clever
55
59
  self.start_date = attributes[:'start_date']
56
60
  end
57
61
 
58
- if attributes.has_key?(:'end_date')
59
- self.end_date = attributes[:'end_date']
60
- end
61
-
62
62
  end
63
63
 
64
64
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -79,9 +79,9 @@ module Clever
79
79
  def ==(o)
80
80
  return true if self.equal?(o)
81
81
  self.class == o.class &&
82
+ end_date == o.end_date &&
82
83
  name == o.name &&
83
- start_date == o.start_date &&
84
- end_date == o.end_date
84
+ start_date == o.start_date
85
85
  end
86
86
 
87
87
  # @see the `==` method
@@ -93,7 +93,7 @@ module Clever
93
93
  # Calculates hash code according to all attributes.
94
94
  # @return [Fixnum] Hash code
95
95
  def hash
96
- [name, start_date, end_date].hash
96
+ [end_date, name, start_date].hash
97
97
  end
98
98
 
99
99
  # Builds the object from hash
@@ -10,5 +10,5 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
10
10
  =end
11
11
 
12
12
  module Clever
13
- VERSION = "1.0.0"
13
+ VERSION = "1.1.0"
14
14
  end
@@ -0,0 +1,31 @@
1
+ ## Previous Versions
2
+
3
+ The current client support v1.2 of the API. For v1.1 please use:
4
+
5
+ https://rubygems.org/gems/clever-ruby/versions/0.14.0
6
+ https://github.com/Clever/clever-ruby/tree/0.14
7
+
8
+
9
+ ## Updating the Library
10
+
11
+ 1. Git clone swagger-codegen (https://github.com/swagger-api/swagger-codegen)
12
+
13
+ 2. Git clone Clever's swagger-api repo (https://github.com/Clever/swagger-api)
14
+
15
+ 3. Run this command in the swagger-codegen repo
16
+ ```
17
+ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i $PATH_TO_SWAGGER_API_REPO/v1.2-client.yml -c $PATH_TO_THIS_REPO/override/config.json -l ruby -o $PATH_TO_THIS_REPO
18
+ ```
19
+
20
+ 4. Run `make build` to copy over the override files
21
+
22
+
23
+ ## Publishing
24
+
25
+ Signup to rubygems.org if you don't already have an account, and ask one of the gem [owners](https://rubygems.org/gems/clever-ruby) to add you as an owner. You'll be prompted to log in from the command line when you push the gem, if you aren't already logged in.
26
+
27
+ To add a new owner, you need to be an owner, then run this command: `gem owner clever-ruby -a <emailaddress>`
28
+
29
+ 1. Update `CHANGELOG.md`
30
+ 1. `gem build clever-ruby.gemspec`
31
+ 1. `gem push clever-ruby-X.Y.Z.gem`
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "gemName": "clever-ruby",
3
3
  "moduleName": "Clever",
4
- "gemVersion": "1.0.0"
4
+ "gemVersion": "1.1.0"
5
5
  }
@@ -7,3 +7,8 @@ cp api_client.rb ../lib/clever-ruby/
7
7
 
8
8
  # The tests don't do anything so let's remove them
9
9
  rm -r ../spec || true
10
+
11
+ # Add the extension to the readme if it's not already there
12
+ if ! grep -q -i '## Previous Versions' ../README.md; then
13
+ cat README-extension.md >> ../README.md
14
+ fi
@@ -1,4 +1,4 @@
1
- require 'clever-api'
1
+ require 'clever-ruby'
2
2
 
3
3
  # Setup authorization
4
4
  Clever.configure do |config|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clever-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swagger-Codegen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-06 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -204,8 +204,10 @@ files:
204
204
  - README.md
205
205
  - Rakefile
206
206
  - circle.yml
207
+ - clever-ruby-1.0.0.gem
207
208
  - clever-ruby.gemspec
208
209
  - docs/BadRequest.md
210
+ - docs/Credentials.md
209
211
  - docs/DataApi.md
210
212
  - docs/District.md
211
213
  - docs/DistrictAdmin.md
@@ -273,7 +275,6 @@ files:
273
275
  - docs/TeachersUpdated.md
274
276
  - docs/Term.md
275
277
  - git_push.sh
276
- - instructions.md
277
278
  - lib/clever-ruby.rb
278
279
  - lib/clever-ruby/api/data_api.rb
279
280
  - lib/clever-ruby/api/events_api.rb
@@ -281,6 +282,7 @@ files:
281
282
  - lib/clever-ruby/api_error.rb
282
283
  - lib/clever-ruby/configuration.rb
283
284
  - lib/clever-ruby/models/bad_request.rb
285
+ - lib/clever-ruby/models/credentials.rb
284
286
  - lib/clever-ruby/models/district.rb
285
287
  - lib/clever-ruby/models/district_admin.rb
286
288
  - lib/clever-ruby/models/district_admin_response.rb
@@ -346,6 +348,7 @@ files:
346
348
  - lib/clever-ruby/models/teachers_updated.rb
347
349
  - lib/clever-ruby/models/term.rb
348
350
  - lib/clever-ruby/version.rb
351
+ - override/README-extension.md
349
352
  - override/api_client.rb
350
353
  - override/config.json
351
354
  - override/models/districts_created.rb
@@ -1,12 +0,0 @@
1
- ## Updating the Library
2
-
3
- 1. Git clone swagger-codegen (https://github.com/swagger-api/swagger-codegen)
4
-
5
- 2. Git clone Clever's swagger-api repo (https://github.com/Clever/swagger-api)
6
-
7
- 3. Run this command in the swagger-codegen repo
8
- ```
9
- java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i $PATH_TO_SWAGGER_API_REPO/v1.2-client.yml -c $PATH_TO_THIS_REPO/override/config.json -l ruby -o $PATH_TO_THIS_REPO
10
- ```
11
-
12
- 4. Run `make build` to copy over the override files