commonlit-clever-ruby 2.1.6.beta1 → 2.1.6.beta2
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 +3 -1
- data/Gemfile.lock +37 -29
- data/README.md +994 -61
- data/clever-ruby.gemspec +6 -13
- data/commonlit-clever-ruby-2.1.6.beta1.gem +0 -0
- data/docs/AdminName.md +0 -1
- data/docs/BadRequest.md +0 -1
- data/docs/Contact.md +1 -2
- data/docs/ContactObject.md +0 -1
- data/docs/ContactResponse.md +0 -1
- data/docs/ContactsCreated.md +2 -3
- data/docs/ContactsDeleted.md +2 -3
- data/docs/ContactsResponse.md +0 -1
- data/docs/ContactsUpdated.md +2 -3
- data/docs/Course.md +1 -2
- data/docs/CourseObject.md +0 -1
- data/docs/CourseResponse.md +0 -1
- data/docs/CoursesCreated.md +2 -3
- data/docs/CoursesDeleted.md +2 -3
- data/docs/CoursesResponse.md +0 -1
- data/docs/CoursesUpdated.md +2 -3
- data/docs/Credentials.md +0 -1
- data/docs/DataApi.md +2784 -0
- data/docs/District.md +9 -10
- data/docs/DistrictAdmin.md +2 -3
- data/docs/DistrictAdminObject.md +0 -1
- data/docs/DistrictAdminResponse.md +0 -1
- data/docs/DistrictAdminsResponse.md +0 -1
- data/docs/DistrictObject.md +0 -1
- data/docs/DistrictResponse.md +0 -1
- data/docs/DistrictadminsCreated.md +2 -3
- data/docs/DistrictadminsDeleted.md +2 -3
- data/docs/DistrictadminsUpdated.md +2 -3
- data/docs/DistrictsCreated.md +2 -3
- data/docs/DistrictsDeleted.md +2 -3
- data/docs/DistrictsResponse.md +0 -1
- data/docs/DistrictsUpdated.md +2 -3
- data/docs/Event.md +2 -3
- data/docs/EventResponse.md +0 -1
- data/docs/EventsApi.md +1 -4
- data/docs/EventsResponse.md +0 -1
- data/docs/InternalError.md +0 -1
- data/docs/Link.md +0 -1
- data/docs/Location.md +2 -3
- data/docs/Name.md +1 -2
- data/docs/NotFound.md +0 -1
- data/docs/Principal.md +1 -2
- data/docs/School.md +3 -4
- data/docs/SchoolAdmin.md +3 -4
- data/docs/SchoolAdminObject.md +0 -1
- data/docs/SchoolAdminResponse.md +0 -1
- data/docs/SchoolAdminsResponse.md +0 -1
- data/docs/SchoolEnrollment.md +1 -2
- data/docs/SchoolObject.md +0 -1
- data/docs/SchoolResponse.md +0 -1
- data/docs/SchooladminsCreated.md +2 -3
- data/docs/SchooladminsDeleted.md +2 -3
- data/docs/SchooladminsUpdated.md +2 -3
- data/docs/SchoolsCreated.md +2 -3
- data/docs/SchoolsDeleted.md +2 -3
- data/docs/SchoolsResponse.md +0 -1
- data/docs/SchoolsUpdated.md +2 -3
- data/docs/Section.md +2 -3
- data/docs/SectionObject.md +0 -1
- data/docs/SectionResponse.md +0 -1
- data/docs/SectionsCreated.md +2 -3
- data/docs/SectionsDeleted.md +2 -3
- data/docs/SectionsResponse.md +0 -1
- data/docs/SectionsUpdated.md +2 -3
- data/docs/Student.md +3 -4
- data/docs/StudentObject.md +0 -1
- data/docs/StudentResponse.md +0 -1
- data/docs/StudentsCreated.md +2 -3
- data/docs/StudentsDeleted.md +2 -3
- data/docs/StudentsResponse.md +0 -1
- data/docs/StudentsUpdated.md +2 -3
- data/docs/Teacher.md +2 -3
- data/docs/TeacherObject.md +0 -1
- data/docs/TeacherResponse.md +0 -1
- data/docs/TeachersCreated.md +2 -3
- data/docs/TeachersDeleted.md +2 -3
- data/docs/TeachersResponse.md +0 -1
- data/docs/TeachersUpdated.md +2 -3
- data/docs/Term.md +2 -3
- data/docs/TermObject.md +0 -1
- data/docs/TermResponse.md +0 -1
- data/docs/TermsCreated.md +2 -3
- data/docs/TermsDeleted.md +2 -3
- data/docs/TermsResponse.md +0 -1
- data/docs/TermsUpdated.md +2 -3
- data/git_push.sh +55 -0
- data/lib/clever-ruby/api/data_api.rb +2999 -0
- data/lib/clever-ruby/api/events_api.rb +25 -20
- data/lib/clever-ruby/api_error.rb +23 -4
- data/lib/clever-ruby/configuration.rb +5 -9
- data/lib/clever-ruby/models/admin_name.rb +46 -22
- data/lib/clever-ruby/models/bad_request.rb +42 -20
- data/lib/clever-ruby/models/contact.rb +83 -55
- data/lib/clever-ruby/models/contact_object.rb +42 -20
- data/lib/clever-ruby/models/contact_response.rb +42 -20
- data/lib/clever-ruby/models/contacts_response.rb +44 -22
- data/lib/clever-ruby/models/course.rb +60 -36
- data/lib/clever-ruby/models/course_object.rb +42 -20
- data/lib/clever-ruby/models/course_response.rb +42 -20
- data/lib/clever-ruby/models/courses_response.rb +44 -22
- data/lib/clever-ruby/models/credentials.rb +42 -20
- data/lib/clever-ruby/models/district.rb +122 -94
- data/lib/clever-ruby/models/district_admin.rb +67 -44
- data/lib/clever-ruby/models/district_admin_object.rb +42 -20
- data/lib/clever-ruby/models/district_admin_response.rb +42 -20
- data/lib/clever-ruby/models/district_admins_response.rb +44 -22
- data/lib/clever-ruby/models/district_object.rb +42 -20
- data/lib/clever-ruby/models/district_response.rb +42 -20
- data/lib/clever-ruby/models/districts_response.rb +44 -22
- data/lib/clever-ruby/models/event.rb +60 -33
- data/lib/clever-ruby/models/event_response.rb +42 -20
- data/lib/clever-ruby/models/events_response.rb +44 -22
- data/lib/clever-ruby/models/internal_error.rb +42 -20
- data/lib/clever-ruby/models/link.rb +47 -25
- data/lib/clever-ruby/models/location.rb +73 -45
- data/lib/clever-ruby/models/name.rb +58 -33
- data/lib/clever-ruby/models/not_found.rb +42 -20
- data/lib/clever-ruby/models/principal.rb +55 -31
- data/lib/clever-ruby/models/school.rb +108 -80
- data/lib/clever-ruby/models/school_admin.rb +85 -61
- data/lib/clever-ruby/models/school_admin_object.rb +42 -20
- data/lib/clever-ruby/models/school_admin_response.rb +42 -20
- data/lib/clever-ruby/models/school_admins_response.rb +44 -22
- data/lib/clever-ruby/models/school_enrollment.rb +56 -34
- data/lib/clever-ruby/models/school_object.rb +42 -20
- data/lib/clever-ruby/models/school_response.rb +42 -20
- data/lib/clever-ruby/models/schools_response.rb +44 -22
- data/lib/clever-ruby/models/section.rb +104 -75
- data/lib/clever-ruby/models/section_object.rb +42 -20
- data/lib/clever-ruby/models/section_response.rb +42 -20
- data/lib/clever-ruby/models/sections_response.rb +44 -22
- data/lib/clever-ruby/models/student.rb +147 -126
- data/lib/clever-ruby/models/student_object.rb +42 -20
- data/lib/clever-ruby/models/student_response.rb +42 -20
- data/lib/clever-ruby/models/students_response.rb +44 -22
- data/lib/clever-ruby/models/teacher.rb +89 -63
- data/lib/clever-ruby/models/teacher_object.rb +42 -20
- data/lib/clever-ruby/models/teacher_response.rb +42 -20
- data/lib/clever-ruby/models/teachers_response.rb +44 -22
- data/lib/clever-ruby/models/term.rb +69 -44
- data/lib/clever-ruby/models/term_object.rb +42 -20
- data/lib/clever-ruby/models/term_response.rb +42 -20
- data/lib/clever-ruby/models/terms_response.rb +44 -22
- data/lib/clever-ruby/version.rb +4 -5
- data/lib/clever-ruby.rb +4 -14
- data/override/README-extension.md +1 -1
- data/override/override.sh +3 -0
- data/spec/api/data_api_spec.rb +671 -0
- data/spec/api/events_api_spec.rb +4 -3
- data/spec/api_client_spec.rb +21 -3
- data/spec/spec_helper.rb +4 -3
- metadata +25 -179
- data/docs/ContactsApi.md +0 -231
- data/docs/CoursesApi.md +0 -231
- data/docs/DistrictAdminsApi.md +0 -171
- data/docs/DistrictsApi.md +0 -113
- data/docs/SchoolAdminsApi.md +0 -231
- data/docs/SchoolsApi.md +0 -351
- data/docs/SectionsApi.md +0 -499
- data/docs/StudentsApi.md +0 -463
- data/docs/TeachersApi.md +0 -403
- data/docs/TermsApi.md +0 -231
- data/lib/clever-ruby/api/contacts_api.rb +0 -241
- data/lib/clever-ruby/api/courses_api.rb +0 -241
- data/lib/clever-ruby/api/district_admins_api.rb +0 -182
- data/lib/clever-ruby/api/districts_api.rb +0 -123
- data/lib/clever-ruby/api/school_admins_api.rb +0 -241
- data/lib/clever-ruby/api/schools_api.rb +0 -359
- data/lib/clever-ruby/api/sections_api.rb +0 -500
- data/lib/clever-ruby/api/students_api.rb +0 -468
- data/lib/clever-ruby/api/teachers_api.rb +0 -409
- data/lib/clever-ruby/api/terms_api.rb +0 -241
- data/spec/api/contacts_api_spec.rb +0 -84
- data/spec/api/courses_api_spec.rb +0 -84
- data/spec/api/district_admins_api_spec.rb +0 -70
- data/spec/api/districts_api_spec.rb +0 -56
- data/spec/api/school_admins_api_spec.rb +0 -84
- data/spec/api/schools_api_spec.rb +0 -112
- data/spec/api/sections_api_spec.rb +0 -142
- data/spec/api/students_api_spec.rb +0 -137
- data/spec/api/teachers_api_spec.rb +0 -123
- data/spec/api/terms_api_spec.rb +0 -84
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Data API
|
|
3
|
-
|
|
4
|
-
#Serves the Clever Data API
|
|
5
|
-
|
|
6
|
-
OpenAPI spec version: 2.1.0
|
|
7
|
-
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.37
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'uri'
|
|
14
|
-
|
|
15
|
-
module Clever
|
|
16
|
-
class TeachersApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Returns the district for a teacher
|
|
23
|
-
# @param id
|
|
24
|
-
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [DistrictResponse]
|
|
26
|
-
def get_district_for_teacher(id, opts = {})
|
|
27
|
-
data, _status_code, _headers = get_district_for_teacher_with_http_info(id, opts)
|
|
28
|
-
data
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Returns the district for a teacher
|
|
32
|
-
# @param id
|
|
33
|
-
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(DistrictResponse, Fixnum, Hash)>] DistrictResponse data, response status code and response headers
|
|
35
|
-
def get_district_for_teacher_with_http_info(id, opts = {})
|
|
36
|
-
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: TeachersApi.get_district_for_teacher ...'
|
|
38
|
-
end
|
|
39
|
-
# verify the required parameter 'id' is set
|
|
40
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
41
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TeachersApi.get_district_for_teacher"
|
|
42
|
-
end
|
|
43
|
-
# resource path
|
|
44
|
-
local_var_path = '/teachers/{id}/district'.sub('{' + 'id' + '}', id.to_s)
|
|
45
|
-
|
|
46
|
-
# query parameters
|
|
47
|
-
query_params = {}
|
|
48
|
-
|
|
49
|
-
# header parameters
|
|
50
|
-
header_params = {}
|
|
51
|
-
# HTTP header 'Accept' (if needed)
|
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
53
|
-
|
|
54
|
-
# form parameters
|
|
55
|
-
form_params = {}
|
|
56
|
-
|
|
57
|
-
# http body (model)
|
|
58
|
-
post_body = nil
|
|
59
|
-
auth_names = ['oauth']
|
|
60
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
61
|
-
:header_params => header_params,
|
|
62
|
-
:query_params => query_params,
|
|
63
|
-
:form_params => form_params,
|
|
64
|
-
:body => post_body,
|
|
65
|
-
:auth_names => auth_names,
|
|
66
|
-
:return_type => 'DistrictResponse')
|
|
67
|
-
if @api_client.config.debugging
|
|
68
|
-
@api_client.config.logger.debug "API called: TeachersApi#get_district_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
-
end
|
|
70
|
-
return data, status_code, headers
|
|
71
|
-
end
|
|
72
|
-
# Retrieves school info for a teacher.
|
|
73
|
-
# @param id
|
|
74
|
-
# @param [Hash] opts the optional parameters
|
|
75
|
-
# @return [SchoolResponse]
|
|
76
|
-
def get_school_for_teacher(id, opts = {})
|
|
77
|
-
data, _status_code, _headers = get_school_for_teacher_with_http_info(id, opts)
|
|
78
|
-
data
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# Retrieves school info for a teacher.
|
|
82
|
-
# @param id
|
|
83
|
-
# @param [Hash] opts the optional parameters
|
|
84
|
-
# @return [Array<(SchoolResponse, Fixnum, Hash)>] SchoolResponse data, response status code and response headers
|
|
85
|
-
def get_school_for_teacher_with_http_info(id, opts = {})
|
|
86
|
-
if @api_client.config.debugging
|
|
87
|
-
@api_client.config.logger.debug 'Calling API: TeachersApi.get_school_for_teacher ...'
|
|
88
|
-
end
|
|
89
|
-
# verify the required parameter 'id' is set
|
|
90
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
91
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TeachersApi.get_school_for_teacher"
|
|
92
|
-
end
|
|
93
|
-
# resource path
|
|
94
|
-
local_var_path = '/teachers/{id}/school'.sub('{' + 'id' + '}', id.to_s)
|
|
95
|
-
|
|
96
|
-
# query parameters
|
|
97
|
-
query_params = {}
|
|
98
|
-
|
|
99
|
-
# header parameters
|
|
100
|
-
header_params = {}
|
|
101
|
-
# HTTP header 'Accept' (if needed)
|
|
102
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
103
|
-
|
|
104
|
-
# form parameters
|
|
105
|
-
form_params = {}
|
|
106
|
-
|
|
107
|
-
# http body (model)
|
|
108
|
-
post_body = nil
|
|
109
|
-
auth_names = ['oauth']
|
|
110
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
111
|
-
:header_params => header_params,
|
|
112
|
-
:query_params => query_params,
|
|
113
|
-
:form_params => form_params,
|
|
114
|
-
:body => post_body,
|
|
115
|
-
:auth_names => auth_names,
|
|
116
|
-
:return_type => 'SchoolResponse')
|
|
117
|
-
if @api_client.config.debugging
|
|
118
|
-
@api_client.config.logger.debug "API called: TeachersApi#get_school_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
119
|
-
end
|
|
120
|
-
return data, status_code, headers
|
|
121
|
-
end
|
|
122
|
-
# Returns the schools for a teacher
|
|
123
|
-
# @param id
|
|
124
|
-
# @param [Hash] opts the optional parameters
|
|
125
|
-
# @option opts [Integer] :limit
|
|
126
|
-
# @option opts [String] :starting_after
|
|
127
|
-
# @option opts [String] :ending_before
|
|
128
|
-
# @return [SchoolsResponse]
|
|
129
|
-
def get_schools_for_teacher(id, opts = {})
|
|
130
|
-
data, _status_code, _headers = get_schools_for_teacher_with_http_info(id, opts)
|
|
131
|
-
data
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
# Returns the schools for a teacher
|
|
135
|
-
# @param id
|
|
136
|
-
# @param [Hash] opts the optional parameters
|
|
137
|
-
# @option opts [Integer] :limit
|
|
138
|
-
# @option opts [String] :starting_after
|
|
139
|
-
# @option opts [String] :ending_before
|
|
140
|
-
# @return [Array<(SchoolsResponse, Fixnum, Hash)>] SchoolsResponse data, response status code and response headers
|
|
141
|
-
def get_schools_for_teacher_with_http_info(id, opts = {})
|
|
142
|
-
if @api_client.config.debugging
|
|
143
|
-
@api_client.config.logger.debug 'Calling API: TeachersApi.get_schools_for_teacher ...'
|
|
144
|
-
end
|
|
145
|
-
# verify the required parameter 'id' is set
|
|
146
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
147
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TeachersApi.get_schools_for_teacher"
|
|
148
|
-
end
|
|
149
|
-
# resource path
|
|
150
|
-
local_var_path = '/teachers/{id}/schools'.sub('{' + 'id' + '}', id.to_s)
|
|
151
|
-
|
|
152
|
-
# query parameters
|
|
153
|
-
query_params = {}
|
|
154
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
155
|
-
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
156
|
-
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
157
|
-
|
|
158
|
-
# header parameters
|
|
159
|
-
header_params = {}
|
|
160
|
-
# HTTP header 'Accept' (if needed)
|
|
161
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
162
|
-
|
|
163
|
-
# form parameters
|
|
164
|
-
form_params = {}
|
|
165
|
-
|
|
166
|
-
# http body (model)
|
|
167
|
-
post_body = nil
|
|
168
|
-
auth_names = ['oauth']
|
|
169
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
170
|
-
:header_params => header_params,
|
|
171
|
-
:query_params => query_params,
|
|
172
|
-
:form_params => form_params,
|
|
173
|
-
:body => post_body,
|
|
174
|
-
:auth_names => auth_names,
|
|
175
|
-
:return_type => 'SchoolsResponse')
|
|
176
|
-
if @api_client.config.debugging
|
|
177
|
-
@api_client.config.logger.debug "API called: TeachersApi#get_schools_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
178
|
-
end
|
|
179
|
-
return data, status_code, headers
|
|
180
|
-
end
|
|
181
|
-
# Returns the sections for a teacher
|
|
182
|
-
# @param id
|
|
183
|
-
# @param [Hash] opts the optional parameters
|
|
184
|
-
# @option opts [Integer] :limit
|
|
185
|
-
# @option opts [String] :starting_after
|
|
186
|
-
# @option opts [String] :ending_before
|
|
187
|
-
# @return [SectionsResponse]
|
|
188
|
-
def get_sections_for_teacher(id, opts = {})
|
|
189
|
-
data, _status_code, _headers = get_sections_for_teacher_with_http_info(id, opts)
|
|
190
|
-
data
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
# Returns the sections for a teacher
|
|
194
|
-
# @param id
|
|
195
|
-
# @param [Hash] opts the optional parameters
|
|
196
|
-
# @option opts [Integer] :limit
|
|
197
|
-
# @option opts [String] :starting_after
|
|
198
|
-
# @option opts [String] :ending_before
|
|
199
|
-
# @return [Array<(SectionsResponse, Fixnum, Hash)>] SectionsResponse data, response status code and response headers
|
|
200
|
-
def get_sections_for_teacher_with_http_info(id, opts = {})
|
|
201
|
-
if @api_client.config.debugging
|
|
202
|
-
@api_client.config.logger.debug 'Calling API: TeachersApi.get_sections_for_teacher ...'
|
|
203
|
-
end
|
|
204
|
-
# verify the required parameter 'id' is set
|
|
205
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
206
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TeachersApi.get_sections_for_teacher"
|
|
207
|
-
end
|
|
208
|
-
# resource path
|
|
209
|
-
local_var_path = '/teachers/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
|
|
210
|
-
|
|
211
|
-
# query parameters
|
|
212
|
-
query_params = {}
|
|
213
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
214
|
-
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
215
|
-
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
216
|
-
|
|
217
|
-
# header parameters
|
|
218
|
-
header_params = {}
|
|
219
|
-
# HTTP header 'Accept' (if needed)
|
|
220
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
221
|
-
|
|
222
|
-
# form parameters
|
|
223
|
-
form_params = {}
|
|
224
|
-
|
|
225
|
-
# http body (model)
|
|
226
|
-
post_body = nil
|
|
227
|
-
auth_names = ['oauth']
|
|
228
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
229
|
-
:header_params => header_params,
|
|
230
|
-
:query_params => query_params,
|
|
231
|
-
:form_params => form_params,
|
|
232
|
-
:body => post_body,
|
|
233
|
-
:auth_names => auth_names,
|
|
234
|
-
:return_type => 'SectionsResponse')
|
|
235
|
-
if @api_client.config.debugging
|
|
236
|
-
@api_client.config.logger.debug "API called: TeachersApi#get_sections_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
237
|
-
end
|
|
238
|
-
return data, status_code, headers
|
|
239
|
-
end
|
|
240
|
-
# Returns the students for a teacher
|
|
241
|
-
# @param id
|
|
242
|
-
# @param [Hash] opts the optional parameters
|
|
243
|
-
# @option opts [Integer] :limit
|
|
244
|
-
# @option opts [String] :starting_after
|
|
245
|
-
# @option opts [String] :ending_before
|
|
246
|
-
# @return [StudentsResponse]
|
|
247
|
-
def get_students_for_teacher(id, opts = {})
|
|
248
|
-
data, _status_code, _headers = get_students_for_teacher_with_http_info(id, opts)
|
|
249
|
-
data
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
# Returns the students for a teacher
|
|
253
|
-
# @param id
|
|
254
|
-
# @param [Hash] opts the optional parameters
|
|
255
|
-
# @option opts [Integer] :limit
|
|
256
|
-
# @option opts [String] :starting_after
|
|
257
|
-
# @option opts [String] :ending_before
|
|
258
|
-
# @return [Array<(StudentsResponse, Fixnum, Hash)>] StudentsResponse data, response status code and response headers
|
|
259
|
-
def get_students_for_teacher_with_http_info(id, opts = {})
|
|
260
|
-
if @api_client.config.debugging
|
|
261
|
-
@api_client.config.logger.debug 'Calling API: TeachersApi.get_students_for_teacher ...'
|
|
262
|
-
end
|
|
263
|
-
# verify the required parameter 'id' is set
|
|
264
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
265
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TeachersApi.get_students_for_teacher"
|
|
266
|
-
end
|
|
267
|
-
# resource path
|
|
268
|
-
local_var_path = '/teachers/{id}/students'.sub('{' + 'id' + '}', id.to_s)
|
|
269
|
-
|
|
270
|
-
# query parameters
|
|
271
|
-
query_params = {}
|
|
272
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
273
|
-
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
274
|
-
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
275
|
-
|
|
276
|
-
# header parameters
|
|
277
|
-
header_params = {}
|
|
278
|
-
# HTTP header 'Accept' (if needed)
|
|
279
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
280
|
-
|
|
281
|
-
# form parameters
|
|
282
|
-
form_params = {}
|
|
283
|
-
|
|
284
|
-
# http body (model)
|
|
285
|
-
post_body = nil
|
|
286
|
-
auth_names = ['oauth']
|
|
287
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
288
|
-
:header_params => header_params,
|
|
289
|
-
:query_params => query_params,
|
|
290
|
-
:form_params => form_params,
|
|
291
|
-
:body => post_body,
|
|
292
|
-
:auth_names => auth_names,
|
|
293
|
-
:return_type => 'StudentsResponse')
|
|
294
|
-
if @api_client.config.debugging
|
|
295
|
-
@api_client.config.logger.debug "API called: TeachersApi#get_students_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
296
|
-
end
|
|
297
|
-
return data, status_code, headers
|
|
298
|
-
end
|
|
299
|
-
# Returns a specific teacher
|
|
300
|
-
# @param id
|
|
301
|
-
# @param [Hash] opts the optional parameters
|
|
302
|
-
# @return [TeacherResponse]
|
|
303
|
-
def get_teacher(id, opts = {})
|
|
304
|
-
data, _status_code, _headers = get_teacher_with_http_info(id, opts)
|
|
305
|
-
data
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
# Returns a specific teacher
|
|
309
|
-
# @param id
|
|
310
|
-
# @param [Hash] opts the optional parameters
|
|
311
|
-
# @return [Array<(TeacherResponse, Fixnum, Hash)>] TeacherResponse data, response status code and response headers
|
|
312
|
-
def get_teacher_with_http_info(id, opts = {})
|
|
313
|
-
if @api_client.config.debugging
|
|
314
|
-
@api_client.config.logger.debug 'Calling API: TeachersApi.get_teacher ...'
|
|
315
|
-
end
|
|
316
|
-
# verify the required parameter 'id' is set
|
|
317
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
318
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TeachersApi.get_teacher"
|
|
319
|
-
end
|
|
320
|
-
# resource path
|
|
321
|
-
local_var_path = '/teachers/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
322
|
-
|
|
323
|
-
# query parameters
|
|
324
|
-
query_params = {}
|
|
325
|
-
|
|
326
|
-
# header parameters
|
|
327
|
-
header_params = {}
|
|
328
|
-
# HTTP header 'Accept' (if needed)
|
|
329
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
330
|
-
|
|
331
|
-
# form parameters
|
|
332
|
-
form_params = {}
|
|
333
|
-
|
|
334
|
-
# http body (model)
|
|
335
|
-
post_body = nil
|
|
336
|
-
auth_names = ['oauth']
|
|
337
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
338
|
-
:header_params => header_params,
|
|
339
|
-
:query_params => query_params,
|
|
340
|
-
:form_params => form_params,
|
|
341
|
-
:body => post_body,
|
|
342
|
-
:auth_names => auth_names,
|
|
343
|
-
:return_type => 'TeacherResponse')
|
|
344
|
-
if @api_client.config.debugging
|
|
345
|
-
@api_client.config.logger.debug "API called: TeachersApi#get_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
346
|
-
end
|
|
347
|
-
return data, status_code, headers
|
|
348
|
-
end
|
|
349
|
-
# Returns a list of teachers
|
|
350
|
-
# @param [Hash] opts the optional parameters
|
|
351
|
-
# @option opts [Integer] :limit
|
|
352
|
-
# @option opts [String] :starting_after
|
|
353
|
-
# @option opts [String] :ending_before
|
|
354
|
-
# @option opts [String] :count
|
|
355
|
-
# @return [TeachersResponse]
|
|
356
|
-
def get_teachers(opts = {})
|
|
357
|
-
data, _status_code, _headers = get_teachers_with_http_info(opts)
|
|
358
|
-
data
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
# Returns a list of teachers
|
|
362
|
-
# @param [Hash] opts the optional parameters
|
|
363
|
-
# @option opts [Integer] :limit
|
|
364
|
-
# @option opts [String] :starting_after
|
|
365
|
-
# @option opts [String] :ending_before
|
|
366
|
-
# @option opts [String] :count
|
|
367
|
-
# @return [Array<(TeachersResponse, Fixnum, Hash)>] TeachersResponse data, response status code and response headers
|
|
368
|
-
def get_teachers_with_http_info(opts = {})
|
|
369
|
-
if @api_client.config.debugging
|
|
370
|
-
@api_client.config.logger.debug 'Calling API: TeachersApi.get_teachers ...'
|
|
371
|
-
end
|
|
372
|
-
if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
|
|
373
|
-
fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
|
|
374
|
-
end
|
|
375
|
-
# resource path
|
|
376
|
-
local_var_path = '/teachers'
|
|
377
|
-
|
|
378
|
-
# query parameters
|
|
379
|
-
query_params = {}
|
|
380
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
381
|
-
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
382
|
-
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
383
|
-
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
384
|
-
|
|
385
|
-
# header parameters
|
|
386
|
-
header_params = {}
|
|
387
|
-
# HTTP header 'Accept' (if needed)
|
|
388
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
389
|
-
|
|
390
|
-
# form parameters
|
|
391
|
-
form_params = {}
|
|
392
|
-
|
|
393
|
-
# http body (model)
|
|
394
|
-
post_body = nil
|
|
395
|
-
auth_names = ['oauth']
|
|
396
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
397
|
-
:header_params => header_params,
|
|
398
|
-
:query_params => query_params,
|
|
399
|
-
:form_params => form_params,
|
|
400
|
-
:body => post_body,
|
|
401
|
-
:auth_names => auth_names,
|
|
402
|
-
:return_type => 'TeachersResponse')
|
|
403
|
-
if @api_client.config.debugging
|
|
404
|
-
@api_client.config.logger.debug "API called: TeachersApi#get_teachers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
405
|
-
end
|
|
406
|
-
return data, status_code, headers
|
|
407
|
-
end
|
|
408
|
-
end
|
|
409
|
-
end
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Data API
|
|
3
|
-
|
|
4
|
-
#Serves the Clever Data API
|
|
5
|
-
|
|
6
|
-
OpenAPI spec version: 2.1.0
|
|
7
|
-
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.37
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'uri'
|
|
14
|
-
|
|
15
|
-
module Clever
|
|
16
|
-
class TermsApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Returns the district for a term
|
|
23
|
-
# @param id
|
|
24
|
-
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [DistrictResponse]
|
|
26
|
-
def get_district_for_term(id, opts = {})
|
|
27
|
-
data, _status_code, _headers = get_district_for_term_with_http_info(id, opts)
|
|
28
|
-
data
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Returns the district for a term
|
|
32
|
-
# @param id
|
|
33
|
-
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(DistrictResponse, Fixnum, Hash)>] DistrictResponse data, response status code and response headers
|
|
35
|
-
def get_district_for_term_with_http_info(id, opts = {})
|
|
36
|
-
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: TermsApi.get_district_for_term ...'
|
|
38
|
-
end
|
|
39
|
-
# verify the required parameter 'id' is set
|
|
40
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
41
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TermsApi.get_district_for_term"
|
|
42
|
-
end
|
|
43
|
-
# resource path
|
|
44
|
-
local_var_path = '/terms/{id}/district'.sub('{' + 'id' + '}', id.to_s)
|
|
45
|
-
|
|
46
|
-
# query parameters
|
|
47
|
-
query_params = {}
|
|
48
|
-
|
|
49
|
-
# header parameters
|
|
50
|
-
header_params = {}
|
|
51
|
-
# HTTP header 'Accept' (if needed)
|
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
53
|
-
|
|
54
|
-
# form parameters
|
|
55
|
-
form_params = {}
|
|
56
|
-
|
|
57
|
-
# http body (model)
|
|
58
|
-
post_body = nil
|
|
59
|
-
auth_names = ['oauth']
|
|
60
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
61
|
-
:header_params => header_params,
|
|
62
|
-
:query_params => query_params,
|
|
63
|
-
:form_params => form_params,
|
|
64
|
-
:body => post_body,
|
|
65
|
-
:auth_names => auth_names,
|
|
66
|
-
:return_type => 'DistrictResponse')
|
|
67
|
-
if @api_client.config.debugging
|
|
68
|
-
@api_client.config.logger.debug "API called: TermsApi#get_district_for_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
-
end
|
|
70
|
-
return data, status_code, headers
|
|
71
|
-
end
|
|
72
|
-
# Returns the sections for a term
|
|
73
|
-
# @param id
|
|
74
|
-
# @param [Hash] opts the optional parameters
|
|
75
|
-
# @option opts [Integer] :limit
|
|
76
|
-
# @option opts [String] :starting_after
|
|
77
|
-
# @option opts [String] :ending_before
|
|
78
|
-
# @return [SectionsResponse]
|
|
79
|
-
def get_sections_for_term(id, opts = {})
|
|
80
|
-
data, _status_code, _headers = get_sections_for_term_with_http_info(id, opts)
|
|
81
|
-
data
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Returns the sections for a term
|
|
85
|
-
# @param id
|
|
86
|
-
# @param [Hash] opts the optional parameters
|
|
87
|
-
# @option opts [Integer] :limit
|
|
88
|
-
# @option opts [String] :starting_after
|
|
89
|
-
# @option opts [String] :ending_before
|
|
90
|
-
# @return [Array<(SectionsResponse, Fixnum, Hash)>] SectionsResponse data, response status code and response headers
|
|
91
|
-
def get_sections_for_term_with_http_info(id, opts = {})
|
|
92
|
-
if @api_client.config.debugging
|
|
93
|
-
@api_client.config.logger.debug 'Calling API: TermsApi.get_sections_for_term ...'
|
|
94
|
-
end
|
|
95
|
-
# verify the required parameter 'id' is set
|
|
96
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
97
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TermsApi.get_sections_for_term"
|
|
98
|
-
end
|
|
99
|
-
# resource path
|
|
100
|
-
local_var_path = '/terms/{id}/sections'.sub('{' + 'id' + '}', id.to_s)
|
|
101
|
-
|
|
102
|
-
# query parameters
|
|
103
|
-
query_params = {}
|
|
104
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
105
|
-
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
106
|
-
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
107
|
-
|
|
108
|
-
# header parameters
|
|
109
|
-
header_params = {}
|
|
110
|
-
# HTTP header 'Accept' (if needed)
|
|
111
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
112
|
-
|
|
113
|
-
# form parameters
|
|
114
|
-
form_params = {}
|
|
115
|
-
|
|
116
|
-
# http body (model)
|
|
117
|
-
post_body = nil
|
|
118
|
-
auth_names = ['oauth']
|
|
119
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
120
|
-
:header_params => header_params,
|
|
121
|
-
:query_params => query_params,
|
|
122
|
-
:form_params => form_params,
|
|
123
|
-
:body => post_body,
|
|
124
|
-
:auth_names => auth_names,
|
|
125
|
-
:return_type => 'SectionsResponse')
|
|
126
|
-
if @api_client.config.debugging
|
|
127
|
-
@api_client.config.logger.debug "API called: TermsApi#get_sections_for_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
-
end
|
|
129
|
-
return data, status_code, headers
|
|
130
|
-
end
|
|
131
|
-
# Returns a specific term
|
|
132
|
-
# @param id
|
|
133
|
-
# @param [Hash] opts the optional parameters
|
|
134
|
-
# @return [TermResponse]
|
|
135
|
-
def get_term(id, opts = {})
|
|
136
|
-
data, _status_code, _headers = get_term_with_http_info(id, opts)
|
|
137
|
-
data
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# Returns a specific term
|
|
141
|
-
# @param id
|
|
142
|
-
# @param [Hash] opts the optional parameters
|
|
143
|
-
# @return [Array<(TermResponse, Fixnum, Hash)>] TermResponse data, response status code and response headers
|
|
144
|
-
def get_term_with_http_info(id, opts = {})
|
|
145
|
-
if @api_client.config.debugging
|
|
146
|
-
@api_client.config.logger.debug 'Calling API: TermsApi.get_term ...'
|
|
147
|
-
end
|
|
148
|
-
# verify the required parameter 'id' is set
|
|
149
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
150
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TermsApi.get_term"
|
|
151
|
-
end
|
|
152
|
-
# resource path
|
|
153
|
-
local_var_path = '/terms/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
154
|
-
|
|
155
|
-
# query parameters
|
|
156
|
-
query_params = {}
|
|
157
|
-
|
|
158
|
-
# header parameters
|
|
159
|
-
header_params = {}
|
|
160
|
-
# HTTP header 'Accept' (if needed)
|
|
161
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
162
|
-
|
|
163
|
-
# form parameters
|
|
164
|
-
form_params = {}
|
|
165
|
-
|
|
166
|
-
# http body (model)
|
|
167
|
-
post_body = nil
|
|
168
|
-
auth_names = ['oauth']
|
|
169
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
170
|
-
:header_params => header_params,
|
|
171
|
-
:query_params => query_params,
|
|
172
|
-
:form_params => form_params,
|
|
173
|
-
:body => post_body,
|
|
174
|
-
:auth_names => auth_names,
|
|
175
|
-
:return_type => 'TermResponse')
|
|
176
|
-
if @api_client.config.debugging
|
|
177
|
-
@api_client.config.logger.debug "API called: TermsApi#get_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
178
|
-
end
|
|
179
|
-
return data, status_code, headers
|
|
180
|
-
end
|
|
181
|
-
# Returns a list of terms
|
|
182
|
-
# @param [Hash] opts the optional parameters
|
|
183
|
-
# @option opts [Integer] :limit
|
|
184
|
-
# @option opts [String] :starting_after
|
|
185
|
-
# @option opts [String] :ending_before
|
|
186
|
-
# @option opts [String] :count
|
|
187
|
-
# @return [TermsResponse]
|
|
188
|
-
def get_terms(opts = {})
|
|
189
|
-
data, _status_code, _headers = get_terms_with_http_info(opts)
|
|
190
|
-
data
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
# Returns a list of terms
|
|
194
|
-
# @param [Hash] opts the optional parameters
|
|
195
|
-
# @option opts [Integer] :limit
|
|
196
|
-
# @option opts [String] :starting_after
|
|
197
|
-
# @option opts [String] :ending_before
|
|
198
|
-
# @option opts [String] :count
|
|
199
|
-
# @return [Array<(TermsResponse, Fixnum, Hash)>] TermsResponse data, response status code and response headers
|
|
200
|
-
def get_terms_with_http_info(opts = {})
|
|
201
|
-
if @api_client.config.debugging
|
|
202
|
-
@api_client.config.logger.debug 'Calling API: TermsApi.get_terms ...'
|
|
203
|
-
end
|
|
204
|
-
if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
|
|
205
|
-
fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
|
|
206
|
-
end
|
|
207
|
-
# resource path
|
|
208
|
-
local_var_path = '/terms'
|
|
209
|
-
|
|
210
|
-
# query parameters
|
|
211
|
-
query_params = {}
|
|
212
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
213
|
-
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
214
|
-
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
215
|
-
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
216
|
-
|
|
217
|
-
# header parameters
|
|
218
|
-
header_params = {}
|
|
219
|
-
# HTTP header 'Accept' (if needed)
|
|
220
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
221
|
-
|
|
222
|
-
# form parameters
|
|
223
|
-
form_params = {}
|
|
224
|
-
|
|
225
|
-
# http body (model)
|
|
226
|
-
post_body = nil
|
|
227
|
-
auth_names = ['oauth']
|
|
228
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
229
|
-
:header_params => header_params,
|
|
230
|
-
:query_params => query_params,
|
|
231
|
-
:form_params => form_params,
|
|
232
|
-
:body => post_body,
|
|
233
|
-
:auth_names => auth_names,
|
|
234
|
-
:return_type => 'TermsResponse')
|
|
235
|
-
if @api_client.config.debugging
|
|
236
|
-
@api_client.config.logger.debug "API called: TermsApi#get_terms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
237
|
-
end
|
|
238
|
-
return data, status_code, headers
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
end
|