commonlit-clever-ruby 2.1.3 → 2.1.6.beta1
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 +27 -30
- data/Makefile +1 -1
- data/README.md +64 -65
- data/clever-ruby.gemspec +5 -5
- data/docs/Contact.md +1 -1
- data/docs/ContactsApi.md +231 -0
- data/docs/ContactsCreated.md +2 -2
- data/docs/ContactsDeleted.md +2 -2
- data/docs/ContactsUpdated.md +2 -2
- data/docs/Course.md +1 -1
- data/docs/CoursesApi.md +231 -0
- data/docs/CoursesCreated.md +2 -2
- data/docs/CoursesDeleted.md +2 -2
- data/docs/CoursesUpdated.md +2 -2
- data/docs/District.md +9 -9
- data/docs/DistrictAdmin.md +2 -2
- data/docs/DistrictAdminsApi.md +171 -0
- data/docs/DistrictadminsCreated.md +2 -2
- data/docs/DistrictadminsDeleted.md +2 -2
- data/docs/DistrictadminsUpdated.md +2 -2
- data/docs/DistrictsApi.md +113 -0
- data/docs/DistrictsCreated.md +2 -2
- data/docs/DistrictsDeleted.md +2 -2
- data/docs/DistrictsUpdated.md +2 -2
- data/docs/Event.md +2 -2
- data/docs/EventsApi.md +1 -1
- data/docs/Location.md +2 -2
- data/docs/Name.md +1 -1
- data/docs/Principal.md +1 -1
- data/docs/School.md +3 -3
- data/docs/SchoolAdmin.md +3 -3
- data/docs/SchoolAdminsApi.md +231 -0
- data/docs/SchoolEnrollment.md +1 -1
- data/docs/SchooladminsCreated.md +2 -2
- data/docs/SchooladminsDeleted.md +2 -2
- data/docs/SchooladminsUpdated.md +2 -2
- data/docs/SchoolsApi.md +351 -0
- data/docs/SchoolsCreated.md +2 -2
- data/docs/SchoolsDeleted.md +2 -2
- data/docs/SchoolsUpdated.md +2 -2
- data/docs/Section.md +2 -2
- data/docs/SectionsApi.md +499 -0
- data/docs/SectionsCreated.md +2 -2
- data/docs/SectionsDeleted.md +2 -2
- data/docs/SectionsUpdated.md +2 -2
- data/docs/Student.md +3 -3
- data/docs/StudentsApi.md +463 -0
- data/docs/StudentsCreated.md +2 -2
- data/docs/StudentsDeleted.md +2 -2
- data/docs/StudentsUpdated.md +2 -2
- data/docs/Teacher.md +2 -2
- data/docs/TeachersApi.md +403 -0
- data/docs/TeachersCreated.md +2 -2
- data/docs/TeachersDeleted.md +2 -2
- data/docs/TeachersUpdated.md +2 -2
- data/docs/Term.md +2 -2
- data/docs/TermsApi.md +231 -0
- data/docs/TermsCreated.md +2 -2
- data/docs/TermsDeleted.md +2 -2
- data/docs/TermsUpdated.md +2 -2
- data/full-v2.yml +2541 -0
- data/lib/clever-ruby/api/contacts_api.rb +241 -0
- data/lib/clever-ruby/api/courses_api.rb +241 -0
- data/lib/clever-ruby/api/district_admins_api.rb +182 -0
- data/lib/clever-ruby/api/districts_api.rb +123 -0
- data/lib/clever-ruby/api/events_api.rb +3 -3
- data/lib/clever-ruby/api/school_admins_api.rb +241 -0
- data/lib/clever-ruby/api/schools_api.rb +359 -0
- data/lib/clever-ruby/api/sections_api.rb +500 -0
- data/lib/clever-ruby/api/students_api.rb +468 -0
- data/lib/clever-ruby/api/teachers_api.rb +409 -0
- data/lib/clever-ruby/api/terms_api.rb +241 -0
- data/lib/clever-ruby/api_client.rb +1 -0
- data/lib/clever-ruby/api_error.rb +3 -3
- data/lib/clever-ruby/configuration.rb +4 -4
- data/lib/clever-ruby/models/admin_name.rb +3 -3
- data/lib/clever-ruby/models/bad_request.rb +3 -3
- data/lib/clever-ruby/models/contact.rb +13 -13
- data/lib/clever-ruby/models/contact_object.rb +3 -3
- data/lib/clever-ruby/models/contact_response.rb +3 -3
- data/lib/clever-ruby/models/contacts_response.rb +3 -3
- data/lib/clever-ruby/models/course.rb +16 -16
- data/lib/clever-ruby/models/course_object.rb +3 -3
- data/lib/clever-ruby/models/course_response.rb +3 -3
- data/lib/clever-ruby/models/courses_response.rb +3 -3
- data/lib/clever-ruby/models/credentials.rb +3 -3
- data/lib/clever-ruby/models/district.rb +71 -71
- data/lib/clever-ruby/models/district_admin.rb +25 -25
- data/lib/clever-ruby/models/district_admin_object.rb +3 -3
- data/lib/clever-ruby/models/district_admin_response.rb +3 -3
- data/lib/clever-ruby/models/district_admins_response.rb +3 -3
- data/lib/clever-ruby/models/district_object.rb +3 -3
- data/lib/clever-ruby/models/district_response.rb +3 -3
- data/lib/clever-ruby/models/districts_response.rb +3 -3
- data/lib/clever-ruby/models/event.rb +16 -16
- data/lib/clever-ruby/models/event_response.rb +3 -3
- data/lib/clever-ruby/models/events_response.rb +3 -3
- data/lib/clever-ruby/models/internal_error.rb +3 -3
- data/lib/clever-ruby/models/link.rb +3 -3
- data/lib/clever-ruby/models/location.rb +25 -25
- data/lib/clever-ruby/models/name.rb +16 -16
- data/lib/clever-ruby/models/not_found.rb +3 -3
- data/lib/clever-ruby/models/principal.rb +16 -16
- data/lib/clever-ruby/models/school.rb +34 -34
- data/lib/clever-ruby/models/school_admin.rb +34 -34
- data/lib/clever-ruby/models/school_admin_object.rb +3 -3
- data/lib/clever-ruby/models/school_admin_response.rb +3 -3
- data/lib/clever-ruby/models/school_admins_response.rb +3 -3
- data/lib/clever-ruby/models/school_enrollment.rb +16 -16
- data/lib/clever-ruby/models/school_object.rb +3 -3
- data/lib/clever-ruby/models/school_response.rb +3 -3
- data/lib/clever-ruby/models/schools_response.rb +3 -3
- data/lib/clever-ruby/models/section.rb +25 -25
- data/lib/clever-ruby/models/section_object.rb +3 -3
- data/lib/clever-ruby/models/section_response.rb +3 -3
- data/lib/clever-ruby/models/sections_response.rb +3 -3
- data/lib/clever-ruby/models/student.rb +49 -34
- data/lib/clever-ruby/models/student_object.rb +3 -3
- data/lib/clever-ruby/models/student_response.rb +3 -3
- data/lib/clever-ruby/models/students_response.rb +3 -3
- data/lib/clever-ruby/models/teacher.rb +25 -25
- data/lib/clever-ruby/models/teacher_object.rb +3 -3
- data/lib/clever-ruby/models/teacher_response.rb +3 -3
- data/lib/clever-ruby/models/teachers_response.rb +3 -3
- data/lib/clever-ruby/models/term.rb +25 -25
- data/lib/clever-ruby/models/term_object.rb +3 -3
- data/lib/clever-ruby/models/term_response.rb +3 -3
- data/lib/clever-ruby/models/terms_response.rb +3 -3
- data/lib/clever-ruby/version.rb +4 -4
- data/lib/clever-ruby.rb +13 -4
- data/override/README-extension.md +4 -5
- data/override/api_client.rb +1 -0
- data/override/override.sh +4 -5
- data/spec/api/contacts_api_spec.rb +84 -0
- data/spec/api/courses_api_spec.rb +84 -0
- data/spec/api/district_admins_api_spec.rb +70 -0
- data/spec/api/districts_api_spec.rb +56 -0
- data/spec/api/events_api_spec.rb +3 -4
- data/spec/api/school_admins_api_spec.rb +84 -0
- data/spec/api/schools_api_spec.rb +112 -0
- data/spec/api/sections_api_spec.rb +142 -0
- data/spec/api/students_api_spec.rb +137 -0
- data/spec/api/teachers_api_spec.rb +123 -0
- data/spec/api/terms_api_spec.rb +84 -0
- data/spec/api_client_spec.rb +3 -4
- data/spec/spec_helper.rb +25 -18
- metadata +48 -179
- data/docs/DataApi.md +0 -2852
- data/git_push.sh +0 -55
- data/lib/clever-ruby/api/data_api.rb +0 -2798
- data/spec/api/data_api_spec.rb +0 -671
- data/spec/configuration_spec.rb +0 -42
- data/spec/events.json +0 -227
- data/spec/models/bad_request_spec.rb +0 -41
- data/spec/models/contact_object_spec.rb +0 -41
- data/spec/models/contact_response_spec.rb +0 -41
- data/spec/models/contact_spec.rb +0 -107
- data/spec/models/contacts_created_spec.rb +0 -59
- data/spec/models/contacts_deleted_spec.rb +0 -59
- data/spec/models/contacts_response_spec.rb +0 -41
- data/spec/models/contacts_updated_spec.rb +0 -65
- data/spec/models/course_object_spec.rb +0 -41
- data/spec/models/course_response_spec.rb +0 -41
- data/spec/models/course_spec.rb +0 -59
- data/spec/models/courses_created_spec.rb +0 -59
- data/spec/models/courses_deleted_spec.rb +0 -59
- data/spec/models/courses_response_spec.rb +0 -41
- data/spec/models/courses_updated_spec.rb +0 -65
- data/spec/models/credentials_spec.rb +0 -41
- data/spec/models/district_admin_object_spec.rb +0 -41
- data/spec/models/district_admin_response_spec.rb +0 -41
- data/spec/models/district_admin_spec.rb +0 -65
- data/spec/models/district_admins_response_spec.rb +0 -41
- data/spec/models/district_object_spec.rb +0 -41
- data/spec/models/district_response_spec.rb +0 -41
- data/spec/models/district_spec.rb +0 -123
- data/spec/models/districtadmins_created_spec.rb +0 -59
- data/spec/models/districtadmins_deleted_spec.rb +0 -59
- data/spec/models/districtadmins_updated_spec.rb +0 -65
- data/spec/models/districts_created_spec.rb +0 -59
- data/spec/models/districts_deleted_spec.rb +0 -59
- data/spec/models/districts_response_spec.rb +0 -41
- data/spec/models/districts_updated_spec.rb +0 -65
- data/spec/models/event_response_spec.rb +0 -41
- data/spec/models/event_spec.rb +0 -53
- data/spec/models/events_response_spec.rb +0 -41
- data/spec/models/internal_error_spec.rb +0 -41
- data/spec/models/location_spec.rb +0 -71
- data/spec/models/name_spec.rb +0 -53
- data/spec/models/not_found_spec.rb +0 -41
- data/spec/models/principal_spec.rb +0 -47
- data/spec/models/school_admin_object_spec.rb +0 -41
- data/spec/models/school_admin_response_spec.rb +0 -41
- data/spec/models/school_admin_spec.rb +0 -95
- data/spec/models/school_admins_response_spec.rb +0 -41
- data/spec/models/school_enrollment_spec.rb +0 -53
- data/spec/models/school_object_spec.rb +0 -41
- data/spec/models/school_response_spec.rb +0 -41
- data/spec/models/school_spec.rb +0 -139
- data/spec/models/schooladmins_created_spec.rb +0 -59
- data/spec/models/schooladmins_deleted_spec.rb +0 -59
- data/spec/models/schooladmins_updated_spec.rb +0 -65
- data/spec/models/schools_created_spec.rb +0 -59
- data/spec/models/schools_deleted_spec.rb +0 -59
- data/spec/models/schools_response_spec.rb +0 -41
- data/spec/models/schools_updated_spec.rb +0 -65
- data/spec/models/section_object_spec.rb +0 -41
- data/spec/models/section_response_spec.rb +0 -41
- data/spec/models/section_spec.rb +0 -145
- data/spec/models/sections_created_spec.rb +0 -59
- data/spec/models/sections_deleted_spec.rb +0 -59
- data/spec/models/sections_response_spec.rb +0 -41
- data/spec/models/sections_updated_spec.rb +0 -65
- data/spec/models/student_object_spec.rb +0 -41
- data/spec/models/student_response_spec.rb +0 -41
- data/spec/models/student_spec.rb +0 -215
- data/spec/models/students_created_spec.rb +0 -59
- data/spec/models/students_deleted_spec.rb +0 -59
- data/spec/models/students_response_spec.rb +0 -41
- data/spec/models/students_updated_spec.rb +0 -65
- data/spec/models/teacher_object_spec.rb +0 -41
- data/spec/models/teacher_response_spec.rb +0 -41
- data/spec/models/teacher_spec.rb +0 -119
- data/spec/models/teachers_created_spec.rb +0 -59
- data/spec/models/teachers_deleted_spec.rb +0 -59
- data/spec/models/teachers_response_spec.rb +0 -41
- data/spec/models/teachers_updated_spec.rb +0 -65
- data/spec/models/term_object_spec.rb +0 -41
- data/spec/models/term_response_spec.rb +0 -41
- data/spec/models/term_spec.rb +0 -65
- data/spec/models/terms_created_spec.rb +0 -59
- data/spec/models/terms_deleted_spec.rb +0 -59
- data/spec/models/terms_response_spec.rb +0 -41
- data/spec/models/terms_updated_spec.rb +0 -65
- data/tags +0 -1681
|
@@ -0,0 +1,241 @@
|
|
|
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 ContactsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Returns a specific student contact
|
|
23
|
+
# @param id
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [ContactResponse]
|
|
26
|
+
def get_contact(id, opts = {})
|
|
27
|
+
data, _status_code, _headers = get_contact_with_http_info(id, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns a specific student contact
|
|
32
|
+
# @param id
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(ContactResponse, Fixnum, Hash)>] ContactResponse data, response status code and response headers
|
|
35
|
+
def get_contact_with_http_info(id, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: ContactsApi.get_contact ...'
|
|
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 ContactsApi.get_contact"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/contacts/{id}'.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 => 'ContactResponse')
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
+
end
|
|
70
|
+
return data, status_code, headers
|
|
71
|
+
end
|
|
72
|
+
# Returns a list of student contacts
|
|
73
|
+
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @option opts [Integer] :limit
|
|
75
|
+
# @option opts [String] :starting_after
|
|
76
|
+
# @option opts [String] :ending_before
|
|
77
|
+
# @option opts [String] :count
|
|
78
|
+
# @return [ContactsResponse]
|
|
79
|
+
def get_contacts(opts = {})
|
|
80
|
+
data, _status_code, _headers = get_contacts_with_http_info(opts)
|
|
81
|
+
data
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns a list of student contacts
|
|
85
|
+
# @param [Hash] opts the optional parameters
|
|
86
|
+
# @option opts [Integer] :limit
|
|
87
|
+
# @option opts [String] :starting_after
|
|
88
|
+
# @option opts [String] :ending_before
|
|
89
|
+
# @option opts [String] :count
|
|
90
|
+
# @return [Array<(ContactsResponse, Fixnum, Hash)>] ContactsResponse data, response status code and response headers
|
|
91
|
+
def get_contacts_with_http_info(opts = {})
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug 'Calling API: ContactsApi.get_contacts ...'
|
|
94
|
+
end
|
|
95
|
+
if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
|
|
96
|
+
fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/contacts'
|
|
100
|
+
|
|
101
|
+
# query parameters
|
|
102
|
+
query_params = {}
|
|
103
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
104
|
+
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
105
|
+
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
106
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].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 => 'ContactsResponse')
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
# Returns the district for a student contact
|
|
132
|
+
# @param id
|
|
133
|
+
# @param [Hash] opts the optional parameters
|
|
134
|
+
# @return [DistrictResponse]
|
|
135
|
+
def get_district_for_contact(id, opts = {})
|
|
136
|
+
data, _status_code, _headers = get_district_for_contact_with_http_info(id, opts)
|
|
137
|
+
data
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Returns the district for a student contact
|
|
141
|
+
# @param id
|
|
142
|
+
# @param [Hash] opts the optional parameters
|
|
143
|
+
# @return [Array<(DistrictResponse, Fixnum, Hash)>] DistrictResponse data, response status code and response headers
|
|
144
|
+
def get_district_for_contact_with_http_info(id, opts = {})
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug 'Calling API: ContactsApi.get_district_for_contact ...'
|
|
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 ContactsApi.get_district_for_contact"
|
|
151
|
+
end
|
|
152
|
+
# resource path
|
|
153
|
+
local_var_path = '/contacts/{id}/district'.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 => 'DistrictResponse')
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_district_for_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
178
|
+
end
|
|
179
|
+
return data, status_code, headers
|
|
180
|
+
end
|
|
181
|
+
# Returns the students for a student contact
|
|
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 [StudentsResponse]
|
|
188
|
+
def get_students_for_contact(id, opts = {})
|
|
189
|
+
data, _status_code, _headers = get_students_for_contact_with_http_info(id, opts)
|
|
190
|
+
data
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the students for a student contact
|
|
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<(StudentsResponse, Fixnum, Hash)>] StudentsResponse data, response status code and response headers
|
|
200
|
+
def get_students_for_contact_with_http_info(id, opts = {})
|
|
201
|
+
if @api_client.config.debugging
|
|
202
|
+
@api_client.config.logger.debug 'Calling API: ContactsApi.get_students_for_contact ...'
|
|
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 ContactsApi.get_students_for_contact"
|
|
207
|
+
end
|
|
208
|
+
# resource path
|
|
209
|
+
local_var_path = '/contacts/{id}/students'.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 => 'StudentsResponse')
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug "API called: ContactsApi#get_students_for_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
237
|
+
end
|
|
238
|
+
return data, status_code, headers
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
@@ -0,0 +1,241 @@
|
|
|
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 CoursesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Returns a specific course
|
|
23
|
+
# @param id
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [CourseResponse]
|
|
26
|
+
def get_course(id, opts = {})
|
|
27
|
+
data, _status_code, _headers = get_course_with_http_info(id, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns a specific course
|
|
32
|
+
# @param id
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(CourseResponse, Fixnum, Hash)>] CourseResponse data, response status code and response headers
|
|
35
|
+
def get_course_with_http_info(id, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: CoursesApi.get_course ...'
|
|
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 CoursesApi.get_course"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/courses/{id}'.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 => 'CourseResponse')
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "API called: CoursesApi#get_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
+
end
|
|
70
|
+
return data, status_code, headers
|
|
71
|
+
end
|
|
72
|
+
# Returns a list of courses
|
|
73
|
+
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @option opts [Integer] :limit
|
|
75
|
+
# @option opts [String] :starting_after
|
|
76
|
+
# @option opts [String] :ending_before
|
|
77
|
+
# @option opts [String] :count
|
|
78
|
+
# @return [CoursesResponse]
|
|
79
|
+
def get_courses(opts = {})
|
|
80
|
+
data, _status_code, _headers = get_courses_with_http_info(opts)
|
|
81
|
+
data
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns a list of courses
|
|
85
|
+
# @param [Hash] opts the optional parameters
|
|
86
|
+
# @option opts [Integer] :limit
|
|
87
|
+
# @option opts [String] :starting_after
|
|
88
|
+
# @option opts [String] :ending_before
|
|
89
|
+
# @option opts [String] :count
|
|
90
|
+
# @return [Array<(CoursesResponse, Fixnum, Hash)>] CoursesResponse data, response status code and response headers
|
|
91
|
+
def get_courses_with_http_info(opts = {})
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug 'Calling API: CoursesApi.get_courses ...'
|
|
94
|
+
end
|
|
95
|
+
if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
|
|
96
|
+
fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/courses'
|
|
100
|
+
|
|
101
|
+
# query parameters
|
|
102
|
+
query_params = {}
|
|
103
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
104
|
+
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
105
|
+
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
106
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].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 => 'CoursesResponse')
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug "API called: CoursesApi#get_courses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
# Returns the district for a course
|
|
132
|
+
# @param id
|
|
133
|
+
# @param [Hash] opts the optional parameters
|
|
134
|
+
# @return [DistrictResponse]
|
|
135
|
+
def get_district_for_course(id, opts = {})
|
|
136
|
+
data, _status_code, _headers = get_district_for_course_with_http_info(id, opts)
|
|
137
|
+
data
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Returns the district for a course
|
|
141
|
+
# @param id
|
|
142
|
+
# @param [Hash] opts the optional parameters
|
|
143
|
+
# @return [Array<(DistrictResponse, Fixnum, Hash)>] DistrictResponse data, response status code and response headers
|
|
144
|
+
def get_district_for_course_with_http_info(id, opts = {})
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug 'Calling API: CoursesApi.get_district_for_course ...'
|
|
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 CoursesApi.get_district_for_course"
|
|
151
|
+
end
|
|
152
|
+
# resource path
|
|
153
|
+
local_var_path = '/courses/{id}/district'.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 => 'DistrictResponse')
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug "API called: CoursesApi#get_district_for_course\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 Courses
|
|
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_course(id, opts = {})
|
|
189
|
+
data, _status_code, _headers = get_sections_for_course_with_http_info(id, opts)
|
|
190
|
+
data
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the sections for a Courses
|
|
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_course_with_http_info(id, opts = {})
|
|
201
|
+
if @api_client.config.debugging
|
|
202
|
+
@api_client.config.logger.debug 'Calling API: CoursesApi.get_sections_for_course ...'
|
|
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 CoursesApi.get_sections_for_course"
|
|
207
|
+
end
|
|
208
|
+
# resource path
|
|
209
|
+
local_var_path = '/courses/{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: CoursesApi#get_sections_for_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
237
|
+
end
|
|
238
|
+
return data, status_code, headers
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
@@ -0,0 +1,182 @@
|
|
|
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 DistrictAdminsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Returns a specific district admin
|
|
23
|
+
# @param id
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [DistrictAdminResponse]
|
|
26
|
+
def get_district_admin(id, opts = {})
|
|
27
|
+
data, _status_code, _headers = get_district_admin_with_http_info(id, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns a specific district admin
|
|
32
|
+
# @param id
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(DistrictAdminResponse, Fixnum, Hash)>] DistrictAdminResponse data, response status code and response headers
|
|
35
|
+
def get_district_admin_with_http_info(id, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: DistrictAdminsApi.get_district_admin ...'
|
|
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 DistrictAdminsApi.get_district_admin"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/district_admins/{id}'.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 => 'DistrictAdminResponse')
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "API called: DistrictAdminsApi#get_district_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
+
end
|
|
70
|
+
return data, status_code, headers
|
|
71
|
+
end
|
|
72
|
+
# Returns a list of district admins
|
|
73
|
+
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @option opts [Integer] :limit
|
|
75
|
+
# @option opts [String] :starting_after
|
|
76
|
+
# @option opts [String] :ending_before
|
|
77
|
+
# @option opts [String] :count
|
|
78
|
+
# @return [DistrictAdminsResponse]
|
|
79
|
+
def get_district_admins(opts = {})
|
|
80
|
+
data, _status_code, _headers = get_district_admins_with_http_info(opts)
|
|
81
|
+
data
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns a list of district admins
|
|
85
|
+
# @param [Hash] opts the optional parameters
|
|
86
|
+
# @option opts [Integer] :limit
|
|
87
|
+
# @option opts [String] :starting_after
|
|
88
|
+
# @option opts [String] :ending_before
|
|
89
|
+
# @option opts [String] :count
|
|
90
|
+
# @return [Array<(DistrictAdminsResponse, Fixnum, Hash)>] DistrictAdminsResponse data, response status code and response headers
|
|
91
|
+
def get_district_admins_with_http_info(opts = {})
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug 'Calling API: DistrictAdminsApi.get_district_admins ...'
|
|
94
|
+
end
|
|
95
|
+
if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true', 'false', 'undefined'].include?(opts[:'count'])
|
|
96
|
+
fail ArgumentError, 'invalid value for "count", must be one of , true, false, undefined'
|
|
97
|
+
end
|
|
98
|
+
# resource path
|
|
99
|
+
local_var_path = '/district_admins'
|
|
100
|
+
|
|
101
|
+
# query parameters
|
|
102
|
+
query_params = {}
|
|
103
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
104
|
+
query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
|
|
105
|
+
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
106
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].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 => 'DistrictAdminsResponse')
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug "API called: DistrictAdminsApi#get_district_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
# Returns the district for a district admin
|
|
132
|
+
# @param id
|
|
133
|
+
# @param [Hash] opts the optional parameters
|
|
134
|
+
# @return [DistrictResponse]
|
|
135
|
+
def get_district_for_district_admin(id, opts = {})
|
|
136
|
+
data, _status_code, _headers = get_district_for_district_admin_with_http_info(id, opts)
|
|
137
|
+
data
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Returns the district for a district admin
|
|
141
|
+
# @param id
|
|
142
|
+
# @param [Hash] opts the optional parameters
|
|
143
|
+
# @return [Array<(DistrictResponse, Fixnum, Hash)>] DistrictResponse data, response status code and response headers
|
|
144
|
+
def get_district_for_district_admin_with_http_info(id, opts = {})
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug 'Calling API: DistrictAdminsApi.get_district_for_district_admin ...'
|
|
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 DistrictAdminsApi.get_district_for_district_admin"
|
|
151
|
+
end
|
|
152
|
+
# resource path
|
|
153
|
+
local_var_path = '/district_admins/{id}/district'.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 => 'DistrictResponse')
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug "API called: DistrictAdminsApi#get_district_for_district_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
178
|
+
end
|
|
179
|
+
return data, status_code, headers
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|