class Clever::DataApi
Attributes
Public Class Methods
# File lib/clever-ruby/api/data_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Returns a specific student contact @param id @param [Hash] opts the optional parameters @return [ContactResponse]
# File lib/clever-ruby/api/data_api.rb, line 26 def get_contact(id, opts = {}) data, _status_code, _headers = get_contact_with_http_info(id, opts) data end
Returns a specific student contact @param id @param [Hash] opts the optional parameters @return [Array<(ContactResponse
, Fixnum, Hash)>] ContactResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 35 def get_contact_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_contact ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_contact" end # resource path local_var_path = '/contacts/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ContactResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of student contacts @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [ContactsResponse]
# File lib/clever-ruby/api/data_api.rb, line 79 def get_contacts(opts = {}) data, _status_code, _headers = get_contacts_with_http_info(opts) data end
Returns the contacts for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [ContactsResponse]
# File lib/clever-ruby/api/data_api.rb, line 138 def get_contacts_for_student(id, opts = {}) data, _status_code, _headers = get_contacts_for_student_with_http_info(id, opts) data end
Returns the contacts for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(ContactsResponse
, Fixnum, Hash)>] ContactsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 150 def get_contacts_for_student_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_contacts_for_student ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_contacts_for_student" end # resource path local_var_path = '/students/{id}/contacts'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ContactsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_contacts_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of student contacts @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(ContactsResponse
, Fixnum, Hash)>] ContactsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 91 def get_contacts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_contacts ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/contacts' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ContactsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific course @param id @param [Hash] opts the optional parameters @return [CourseResponse]
# File lib/clever-ruby/api/data_api.rb, line 194 def get_course(id, opts = {}) data, _status_code, _headers = get_course_with_http_info(id, opts) data end
Returns the course for a section @param id @param [Hash] opts the optional parameters @return [CourseResponse]
# File lib/clever-ruby/api/data_api.rb, line 244 def get_course_for_section(id, opts = {}) data, _status_code, _headers = get_course_for_section_with_http_info(id, opts) data end
Returns the course for a section @param id @param [Hash] opts the optional parameters @return [Array<(CourseResponse
, Fixnum, Hash)>] CourseResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 253 def get_course_for_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_course_for_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_course_for_section" end # resource path local_var_path = '/sections/{id}/course'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CourseResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_course_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific course @param id @param [Hash] opts the optional parameters @return [Array<(CourseResponse
, Fixnum, Hash)>] CourseResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 203 def get_course_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_course ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_course" end # resource path local_var_path = '/courses/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CourseResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of courses @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [CoursesResponse]
# File lib/clever-ruby/api/data_api.rb, line 297 def get_courses(opts = {}) data, _status_code, _headers = get_courses_with_http_info(opts) data end
Returns a list of courses @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(CoursesResponse
, Fixnum, Hash)>] CoursesResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 309 def get_courses_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_courses ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/courses' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CoursesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_courses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific district @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 353 def get_district(id, opts = {}) data, _status_code, _headers = get_district_with_http_info(id, opts) data end
Returns a specific district admin @param id @param [Hash] opts the optional parameters @return [DistrictAdminResponse]
# File lib/clever-ruby/api/data_api.rb, line 403 def get_district_admin(id, opts = {}) data, _status_code, _headers = get_district_admin_with_http_info(id, opts) data end
Returns a specific district admin @param id @param [Hash] opts the optional parameters @return [Array<(DistrictAdminResponse
, Fixnum, Hash)>] DistrictAdminResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 412 def get_district_admin_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_admin ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_admin" end # resource path local_var_path = '/district_admins/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictAdminResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of district admins @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [DistrictAdminsResponse]
# File lib/clever-ruby/api/data_api.rb, line 456 def get_district_admins(opts = {}) data, _status_code, _headers = get_district_admins_with_http_info(opts) data end
Returns a list of district admins @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(DistrictAdminsResponse
, Fixnum, Hash)>] DistrictAdminsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 468 def get_district_admins_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_admins ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/district_admins' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictAdminsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a student contact @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 512 def get_district_for_contact(id, opts = {}) data, _status_code, _headers = get_district_for_contact_with_http_info(id, opts) data end
Returns the district for a student contact @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 521 def get_district_for_contact_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_contact ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_contact" end # resource path local_var_path = '/contacts/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a course @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 562 def get_district_for_course(id, opts = {}) data, _status_code, _headers = get_district_for_course_with_http_info(id, opts) data end
Returns the district for a course @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 571 def get_district_for_course_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_course ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_course" end # resource path local_var_path = '/courses/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a district admin @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 612 def get_district_for_district_admin(id, opts = {}) data, _status_code, _headers = get_district_for_district_admin_with_http_info(id, opts) data end
Returns the district for a district admin @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 621 def get_district_for_district_admin_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_district_admin ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_district_admin" end # resource path local_var_path = '/district_admins/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_district_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a school @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 662 def get_district_for_school(id, opts = {}) data, _status_code, _headers = get_district_for_school_with_http_info(id, opts) data end
Returns the district for a school admin @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 712 def get_district_for_school_admin(id, opts = {}) data, _status_code, _headers = get_district_for_school_admin_with_http_info(id, opts) data end
Returns the district for a school admin @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 721 def get_district_for_school_admin_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_school_admin ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_school_admin" end # resource path local_var_path = '/school_admins/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_school_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a school @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 671 def get_district_for_school_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_school ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_school" end # resource path local_var_path = '/schools/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a section @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 762 def get_district_for_section(id, opts = {}) data, _status_code, _headers = get_district_for_section_with_http_info(id, opts) data end
Returns the district for a section @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 771 def get_district_for_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_section" end # resource path local_var_path = '/sections/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a student @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 812 def get_district_for_student(id, opts = {}) data, _status_code, _headers = get_district_for_student_with_http_info(id, opts) data end
Returns the district for a student @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 821 def get_district_for_student_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_student ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_student" end # resource path local_var_path = '/students/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a teacher @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 862 def get_district_for_teacher(id, opts = {}) data, _status_code, _headers = get_district_for_teacher_with_http_info(id, opts) data end
Returns the district for a teacher @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 871 def get_district_for_teacher_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_teacher ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_teacher" end # resource path local_var_path = '/teachers/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the district for a term @param id @param [Hash] opts the optional parameters @return [DistrictResponse]
# File lib/clever-ruby/api/data_api.rb, line 912 def get_district_for_term(id, opts = {}) data, _status_code, _headers = get_district_for_term_with_http_info(id, opts) data end
Returns the district for a term @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 921 def get_district_for_term_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district_for_term ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district_for_term" end # resource path local_var_path = '/terms/{id}/district'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_for_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific district @param id @param [Hash] opts the optional parameters @return [Array<(DistrictResponse
, Fixnum, Hash)>] DistrictResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 362 def get_district_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_district ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_district" end # resource path local_var_path = '/districts/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of districts @param [Hash] opts the optional parameters @option opts [String] :count @return [DistrictsResponse]
# File lib/clever-ruby/api/data_api.rb, line 962 def get_districts(opts = {}) data, _status_code, _headers = get_districts_with_http_info(opts) data end
Returns a list of districts @param [Hash] opts the optional parameters @option opts [String] :count @return [Array<(DistrictsResponse
, Fixnum, Hash)>] DistrictsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 971 def get_districts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_districts ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/districts' # query parameters query_params = {} query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DistrictsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_districts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific school @param id @param [Hash] opts the optional parameters @return [SchoolResponse]
# File lib/clever-ruby/api/data_api.rb, line 1012 def get_school(id, opts = {}) data, _status_code, _headers = get_school_with_http_info(id, opts) data end
Returns a specific school admin @param id @param [Hash] opts the optional parameters @return [SchoolAdminResponse]
# File lib/clever-ruby/api/data_api.rb, line 1062 def get_school_admin(id, opts = {}) data, _status_code, _headers = get_school_admin_with_http_info(id, opts) data end
Returns a specific school admin @param id @param [Hash] opts the optional parameters @return [Array<(SchoolAdminResponse
, Fixnum, Hash)>] SchoolAdminResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1071 def get_school_admin_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_school_admin ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_admin" end # resource path local_var_path = '/school_admins/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolAdminResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_school_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of school admins @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [SchoolAdminsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1115 def get_school_admins(opts = {}) data, _status_code, _headers = get_school_admins_with_http_info(opts) data end
Returns a list of school admins @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(SchoolAdminsResponse
, Fixnum, Hash)>] SchoolAdminsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1127 def get_school_admins_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_school_admins ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/school_admins' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolAdminsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_school_admins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the school for a section @param id @param [Hash] opts the optional parameters @return [SchoolResponse]
# File lib/clever-ruby/api/data_api.rb, line 1171 def get_school_for_section(id, opts = {}) data, _status_code, _headers = get_school_for_section_with_http_info(id, opts) data end
Returns the school for a section @param id @param [Hash] opts the optional parameters @return [Array<(SchoolResponse
, Fixnum, Hash)>] SchoolResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1180 def get_school_for_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_school_for_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_for_section" end # resource path local_var_path = '/sections/{id}/school'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_school_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the primary school for a student @param id @param [Hash] opts the optional parameters @return [SchoolResponse]
# File lib/clever-ruby/api/data_api.rb, line 1221 def get_school_for_student(id, opts = {}) data, _status_code, _headers = get_school_for_student_with_http_info(id, opts) data end
Returns the primary school for a student @param id @param [Hash] opts the optional parameters @return [Array<(SchoolResponse
, Fixnum, Hash)>] SchoolResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1230 def get_school_for_student_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_school_for_student ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_for_student" end # resource path local_var_path = '/students/{id}/school'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_school_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves school info for a teacher. @param id @param [Hash] opts the optional parameters @return [SchoolResponse]
# File lib/clever-ruby/api/data_api.rb, line 1271 def get_school_for_teacher(id, opts = {}) data, _status_code, _headers = get_school_for_teacher_with_http_info(id, opts) data end
Retrieves school info for a teacher. @param id @param [Hash] opts the optional parameters @return [Array<(SchoolResponse
, Fixnum, Hash)>] SchoolResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1280 def get_school_for_teacher_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_school_for_teacher ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school_for_teacher" end # resource path local_var_path = '/teachers/{id}/school'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_school_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific school @param id @param [Hash] opts the optional parameters @return [Array<(SchoolResponse
, Fixnum, Hash)>] SchoolResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1021 def get_school_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_school ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_school" end # resource path local_var_path = '/schools/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of schools @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [SchoolsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1324 def get_schools(opts = {}) data, _status_code, _headers = get_schools_with_http_info(opts) data end
Returns the schools for a school admin @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SchoolsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1383 def get_schools_for_school_admin(id, opts = {}) data, _status_code, _headers = get_schools_for_school_admin_with_http_info(id, opts) data end
Returns the schools for a school admin @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SchoolsResponse
, Fixnum, Hash)>] SchoolsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1395 def get_schools_for_school_admin_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_schools_for_school_admin ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_schools_for_school_admin" end # resource path local_var_path = '/school_admins/{id}/schools'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_schools_for_school_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the schools for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SchoolsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1442 def get_schools_for_student(id, opts = {}) data, _status_code, _headers = get_schools_for_student_with_http_info(id, opts) data end
Returns the schools for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SchoolsResponse
, Fixnum, Hash)>] SchoolsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1454 def get_schools_for_student_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_schools_for_student ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_schools_for_student" end # resource path local_var_path = '/students/{id}/schools'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_schools_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the schools for a teacher @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SchoolsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1501 def get_schools_for_teacher(id, opts = {}) data, _status_code, _headers = get_schools_for_teacher_with_http_info(id, opts) data end
Returns the schools for a teacher @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SchoolsResponse
, Fixnum, Hash)>] SchoolsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1513 def get_schools_for_teacher_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_schools_for_teacher ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_schools_for_teacher" end # resource path local_var_path = '/teachers/{id}/schools'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_schools_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of schools @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(SchoolsResponse
, Fixnum, Hash)>] SchoolsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1336 def get_schools_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_schools ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/schools' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SchoolsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_schools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific section @param id @param [Hash] opts the optional parameters @return [SectionResponse]
# File lib/clever-ruby/api/data_api.rb, line 1557 def get_section(id, opts = {}) data, _status_code, _headers = get_section_with_http_info(id, opts) data end
Returns a specific section @param id @param [Hash] opts the optional parameters @return [Array<(SectionResponse
, Fixnum, Hash)>] SectionResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1566 def get_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_section" end # resource path local_var_path = '/sections/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SectionResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of sections @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [SectionsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1610 def get_sections(opts = {}) data, _status_code, _headers = get_sections_with_http_info(opts) data end
Returns the sections for a Courses @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SectionsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1669 def get_sections_for_course(id, opts = {}) data, _status_code, _headers = get_sections_for_course_with_http_info(id, opts) data end
Returns the sections for a Courses @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SectionsResponse
, Fixnum, Hash)>] SectionsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1681 def get_sections_for_course_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_course ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_course" end # resource path local_var_path = '/courses/{id}/sections'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SectionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_sections_for_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the sections for a school @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SectionsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1728 def get_sections_for_school(id, opts = {}) data, _status_code, _headers = get_sections_for_school_with_http_info(id, opts) data end
Returns the sections for a school @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SectionsResponse
, Fixnum, Hash)>] SectionsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1740 def get_sections_for_school_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_school ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_school" end # resource path local_var_path = '/schools/{id}/sections'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SectionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_sections_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the sections for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SectionsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1787 def get_sections_for_student(id, opts = {}) data, _status_code, _headers = get_sections_for_student_with_http_info(id, opts) data end
Returns the sections for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SectionsResponse
, Fixnum, Hash)>] SectionsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1799 def get_sections_for_student_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_student ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_student" end # resource path local_var_path = '/students/{id}/sections'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SectionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_sections_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the sections for a teacher @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SectionsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1846 def get_sections_for_teacher(id, opts = {}) data, _status_code, _headers = get_sections_for_teacher_with_http_info(id, opts) data end
Returns the sections for a teacher @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SectionsResponse
, Fixnum, Hash)>] SectionsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1858 def get_sections_for_teacher_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_teacher ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_teacher" end # resource path local_var_path = '/teachers/{id}/sections'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SectionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_sections_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the sections for a term @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [SectionsResponse]
# File lib/clever-ruby/api/data_api.rb, line 1905 def get_sections_for_term(id, opts = {}) data, _status_code, _headers = get_sections_for_term_with_http_info(id, opts) data end
Returns the sections for a term @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(SectionsResponse
, Fixnum, Hash)>] SectionsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1917 def get_sections_for_term_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_sections_for_term ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_sections_for_term" end # resource path local_var_path = '/terms/{id}/sections'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SectionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_sections_for_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of sections @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(SectionsResponse
, Fixnum, Hash)>] SectionsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1622 def get_sections_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_sections ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/sections' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SectionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_sections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific student @param id @param [Hash] opts the optional parameters @return [StudentResponse]
# File lib/clever-ruby/api/data_api.rb, line 1961 def get_student(id, opts = {}) data, _status_code, _headers = get_student_with_http_info(id, opts) data end
Returns a specific student @param id @param [Hash] opts the optional parameters @return [Array<(StudentResponse
, Fixnum, Hash)>] StudentResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 1970 def get_student_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_student ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_student" end # resource path local_var_path = '/students/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StudentResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of students @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [StudentsResponse]
# File lib/clever-ruby/api/data_api.rb, line 2014 def get_students(opts = {}) data, _status_code, _headers = get_students_with_http_info(opts) data end
Returns the students for a student contact @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [StudentsResponse]
# File lib/clever-ruby/api/data_api.rb, line 2073 def get_students_for_contact(id, opts = {}) data, _status_code, _headers = get_students_for_contact_with_http_info(id, opts) data end
Returns the students for a student contact @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(StudentsResponse
, Fixnum, Hash)>] StudentsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2085 def get_students_for_contact_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_contact ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_contact" end # resource path local_var_path = '/contacts/{id}/students'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StudentsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_students_for_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the students for a school @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [StudentsResponse]
# File lib/clever-ruby/api/data_api.rb, line 2132 def get_students_for_school(id, opts = {}) data, _status_code, _headers = get_students_for_school_with_http_info(id, opts) data end
Returns the students for a school @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(StudentsResponse
, Fixnum, Hash)>] StudentsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2144 def get_students_for_school_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_school ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_school" end # resource path local_var_path = '/schools/{id}/students'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StudentsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_students_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the students for a section @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [StudentsResponse]
# File lib/clever-ruby/api/data_api.rb, line 2191 def get_students_for_section(id, opts = {}) data, _status_code, _headers = get_students_for_section_with_http_info(id, opts) data end
Returns the students for a section @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(StudentsResponse
, Fixnum, Hash)>] StudentsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2203 def get_students_for_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_section" end # resource path local_var_path = '/sections/{id}/students'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StudentsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_students_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the students for a teacher @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [StudentsResponse]
# File lib/clever-ruby/api/data_api.rb, line 2250 def get_students_for_teacher(id, opts = {}) data, _status_code, _headers = get_students_for_teacher_with_http_info(id, opts) data end
Returns the students for a teacher @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(StudentsResponse
, Fixnum, Hash)>] StudentsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2262 def get_students_for_teacher_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_students_for_teacher ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_students_for_teacher" end # resource path local_var_path = '/teachers/{id}/students'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StudentsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_students_for_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of students @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(StudentsResponse
, Fixnum, Hash)>] StudentsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2026 def get_students_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_students ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/students' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StudentsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_students\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific teacher @param id @param [Hash] opts the optional parameters @return [TeacherResponse]
# File lib/clever-ruby/api/data_api.rb, line 2306 def get_teacher(id, opts = {}) data, _status_code, _headers = get_teacher_with_http_info(id, opts) data end
Returns the primary teacher for a section @param id @param [Hash] opts the optional parameters @return [TeacherResponse]
# File lib/clever-ruby/api/data_api.rb, line 2356 def get_teacher_for_section(id, opts = {}) data, _status_code, _headers = get_teacher_for_section_with_http_info(id, opts) data end
Returns the primary teacher for a section @param id @param [Hash] opts the optional parameters @return [Array<(TeacherResponse
, Fixnum, Hash)>] TeacherResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2365 def get_teacher_for_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_teacher_for_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teacher_for_section" end # resource path local_var_path = '/sections/{id}/teacher'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TeacherResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_teacher_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific teacher @param id @param [Hash] opts the optional parameters @return [Array<(TeacherResponse
, Fixnum, Hash)>] TeacherResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2315 def get_teacher_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_teacher ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teacher" end # resource path local_var_path = '/teachers/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TeacherResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of teachers @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [TeachersResponse]
# File lib/clever-ruby/api/data_api.rb, line 2409 def get_teachers(opts = {}) data, _status_code, _headers = get_teachers_with_http_info(opts) data end
Returns the teachers for a school @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [TeachersResponse]
# File lib/clever-ruby/api/data_api.rb, line 2468 def get_teachers_for_school(id, opts = {}) data, _status_code, _headers = get_teachers_for_school_with_http_info(id, opts) data end
Returns the teachers for a school @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(TeachersResponse
, Fixnum, Hash)>] TeachersResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2480 def get_teachers_for_school_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_teachers_for_school ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teachers_for_school" end # resource path local_var_path = '/schools/{id}/teachers'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TeachersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_teachers_for_school\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the teachers for a section @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [TeachersResponse]
# File lib/clever-ruby/api/data_api.rb, line 2527 def get_teachers_for_section(id, opts = {}) data, _status_code, _headers = get_teachers_for_section_with_http_info(id, opts) data end
Returns the teachers for a section @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(TeachersResponse
, Fixnum, Hash)>] TeachersResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2539 def get_teachers_for_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_teachers_for_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teachers_for_section" end # resource path local_var_path = '/sections/{id}/teachers'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TeachersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_teachers_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the teachers for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [TeachersResponse]
# File lib/clever-ruby/api/data_api.rb, line 2586 def get_teachers_for_student(id, opts = {}) data, _status_code, _headers = get_teachers_for_student_with_http_info(id, opts) data end
Returns the teachers for a student @param id @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @return [Array<(TeachersResponse
, Fixnum, Hash)>] TeachersResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2598 def get_teachers_for_student_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_teachers_for_student ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_teachers_for_student" end # resource path local_var_path = '/students/{id}/teachers'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TeachersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_teachers_for_student\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of teachers @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(TeachersResponse
, Fixnum, Hash)>] TeachersResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2421 def get_teachers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_teachers ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/teachers' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TeachersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_teachers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific term @param id @param [Hash] opts the optional parameters @return [TermResponse]
# File lib/clever-ruby/api/data_api.rb, line 2642 def get_term(id, opts = {}) data, _status_code, _headers = get_term_with_http_info(id, opts) data end
Returns the term for a section @param id @param [Hash] opts the optional parameters @return [TermResponse]
# File lib/clever-ruby/api/data_api.rb, line 2692 def get_term_for_section(id, opts = {}) data, _status_code, _headers = get_term_for_section_with_http_info(id, opts) data end
Returns the term for a section @param id @param [Hash] opts the optional parameters @return [Array<(TermResponse
, Fixnum, Hash)>] TermResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2701 def get_term_for_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_term_for_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_term_for_section" end # resource path local_var_path = '/sections/{id}/term'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TermResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_term_for_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a specific term @param id @param [Hash] opts the optional parameters @return [Array<(TermResponse
, Fixnum, Hash)>] TermResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2651 def get_term_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_term ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DataApi.get_term" end # resource path local_var_path = '/terms/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TermResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a list of terms @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [TermsResponse]
# File lib/clever-ruby/api/data_api.rb, line 2745 def get_terms(opts = {}) data, _status_code, _headers = get_terms_with_http_info(opts) data end
Returns a list of terms @param [Hash] opts the optional parameters @option opts [Integer] :limit @option opts [String] :starting_after @option opts [String] :ending_before @option opts [String] :count @return [Array<(TermsResponse
, Fixnum, Hash)>] TermsResponse
data, response status code and response headers
# File lib/clever-ruby/api/data_api.rb, line 2757 def get_terms_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DataApi.get_terms ...' end if @api_client.config.client_side_validation && opts[:'count'] && !['', 'true'].include?(opts[:'count']) fail ArgumentError, 'invalid value for "count", must be one of , true' end # resource path local_var_path = '/terms' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TermsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_terms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end