=begin #Clever API #The Clever API OpenAPI spec version: 1.2.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.2.3 =end require "uri" module Clever class DataApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # # Returns a specific student contact # @param id # @param [Hash] opts the optional parameters # @return [StudentContactResponse] def get_contact(id, opts = {}) data, _status_code, _headers = get_contact_with_http_info(id, opts) return data end # # Returns a specific student contact # @param id # @param [Hash] opts the optional parameters # @return [Array<(StudentContactResponse, Fixnum, Hash)>] StudentContactResponse data, response status code and response headers 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 => 'StudentContactResponse') 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 # @return [StudentContactsResponse] def get_contacts(opts = {}) data, _status_code, _headers = get_contacts_with_http_info(opts) return data 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 # @return [Array<(StudentContactsResponse, Fixnum, Hash)>] StudentContactsResponse data, response status code and response headers def get_contacts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_contacts ..." 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? # 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 => 'StudentContactsResponse') 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 the contacts for a student # @param id # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [StudentContactsForStudentResponse] def get_contacts_for_student(id, opts = {}) data, _status_code, _headers = get_contacts_for_student_with_http_info(id, opts) return data end # # Returns the contacts for a student # @param id # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @return [Array<(StudentContactsForStudentResponse, Fixnum, Hash)>] StudentContactsForStudentResponse data, response status code and response headers 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? # 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 => 'StudentContactsForStudentResponse') 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 specific district # @param id # @param [Hash] opts the optional parameters # @return [DistrictResponse] def get_district(id, opts = {}) data, _status_code, _headers = get_district_with_http_info(id, opts) return data 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 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 specific district admin # @param id # @param [Hash] opts the optional parameters # @return [DistrictAdminResponse] def get_district_admin(id, opts = {}) data, _status_code, _headers = get_district_admin_with_http_info(id, opts) return 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 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 [String] :starting_after # @option opts [String] :ending_before # @return [DistrictAdminsResponse] def get_district_admins(opts = {}) data, _status_code, _headers = get_district_admins_with_http_info(opts) return data end # # Returns a list of district admins # @param [Hash] opts the optional parameters # @option opts [String] :starting_after # @option opts [String] :ending_before # @return [Array<(DistrictAdminsResponse, Fixnum, Hash)>] DistrictAdminsResponse data, response status code and response headers 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 # resource path local_var_path = "/district_admins" # query parameters query_params = {} 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 => '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 school # @param id # @param [Hash] opts the optional parameters # @return [DistrictResponse] def get_district_for_school(id, opts = {}) data, _status_code, _headers = get_district_for_school_with_http_info(id, opts) return data 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 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] def get_district_for_section(id, opts = {}) data, _status_code, _headers = get_district_for_section_with_http_info(id, opts) return 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 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] def get_district_for_student(id, opts = {}) data, _status_code, _headers = get_district_for_student_with_http_info(id, opts) return 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 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 student contact # @param id # @param [Hash] opts the optional parameters # @return [DistrictResponse] def get_district_for_student_contact(id, opts = {}) data, _status_code, _headers = get_district_for_student_contact_with_http_info(id, opts) return 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 def get_district_for_student_contact_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_district_for_student_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_student_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_student_contact\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] def get_district_for_teacher(id, opts = {}) data, _status_code, _headers = get_district_for_teacher_with_http_info(id, opts) return 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 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 status of the district # @param id # @param [Hash] opts the optional parameters # @return [DistrictStatusResponses] def get_district_status(id, opts = {}) data, _status_code, _headers = get_district_status_with_http_info(id, opts) return data end # # Returns the status of the district # @param id # @param [Hash] opts the optional parameters # @return [Array<(DistrictStatusResponses, Fixnum, Hash)>] DistrictStatusResponses data, response status code and response headers def get_district_status_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_district_status ..." 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_status" end # resource path local_var_path = "/districts/{id}/status".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 => 'DistrictStatusResponses') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_district_status\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 # @return [DistrictsResponse] def get_districts(opts = {}) data, _status_code, _headers = get_districts_with_http_info(opts) return data end # # Returns a list of districts # @param [Hash] opts the optional parameters # @return [Array<(DistrictsResponse, Fixnum, Hash)>] DistrictsResponse data, response status code and response headers def get_districts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_districts ..." end # resource path local_var_path = "/districts" # 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 => '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 the grade levels for sections a teacher teaches # @param id # @param [Hash] opts the optional parameters # @return [GradeLevelsResponse] def get_grade_levels_for_teacher(id, opts = {}) data, _status_code, _headers = get_grade_levels_for_teacher_with_http_info(id, opts) return data end # # Returns the grade levels for sections a teacher teaches # @param id # @param [Hash] opts the optional parameters # @return [Array<(GradeLevelsResponse, Fixnum, Hash)>] GradeLevelsResponse data, response status code and response headers def get_grade_levels_for_teacher_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_grade_levels_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_grade_levels_for_teacher" end # resource path local_var_path = "/teachers/{id}/grade_levels".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 => 'GradeLevelsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DataApi#get_grade_levels_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 [SchoolResponse] def get_school(id, opts = {}) data, _status_code, _headers = get_school_with_http_info(id, opts) return data 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 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 specific school admin # @param id # @param [Hash] opts the optional parameters # @return [SchoolAdminResponse] def get_school_admin(id, opts = {}) data, _status_code, _headers = get_school_admin_with_http_info(id, opts) return 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 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 # @return [SchoolAdminsResponse] def get_school_admins(opts = {}) data, _status_code, _headers = get_school_admins_with_http_info(opts) return 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 # @return [Array<(SchoolAdminsResponse, Fixnum, Hash)>] SchoolAdminsResponse data, response status code and response headers 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 # 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? # 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] def get_school_for_section(id, opts = {}) data, _status_code, _headers = get_school_for_section_with_http_info(id, opts) return 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 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] def get_school_for_student(id, opts = {}) data, _status_code, _headers = get_school_for_student_with_http_info(id, opts) return 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 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] def get_school_for_teacher(id, opts = {}) data, _status_code, _headers = get_school_for_teacher_with_http_info(id, opts) return 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 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 list of schools # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @option opts [String] :starting_after # @option opts [String] :ending_before # @return [SchoolsResponse] def get_schools(opts = {}) data, _status_code, _headers = get_schools_with_http_info(opts) return data 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 # @return [Array<(SchoolsResponse, Fixnum, Hash)>] SchoolsResponse data, response status code and response headers def get_schools_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_schools ..." 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? # 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 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] def get_schools_for_school_admin(id, opts = {}) data, _status_code, _headers = get_schools_for_school_admin_with_http_info(id, opts) return 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 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 a specific section # @param id # @param [Hash] opts the optional parameters # @return [SectionResponse] def get_section(id, opts = {}) data, _status_code, _headers = get_section_with_http_info(id, opts) return 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 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 # @return [SectionsResponse] def get_sections(opts = {}) data, _status_code, _headers = get_sections_with_http_info(opts) return data 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 # @return [Array<(SectionsResponse, Fixnum, Hash)>] SectionsResponse data, response status code and response headers def get_sections_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_sections ..." 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? # 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 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] def get_sections_for_school(id, opts = {}) data, _status_code, _headers = get_sections_for_school_with_http_info(id, opts) return 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 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] def get_sections_for_student(id, opts = {}) data, _status_code, _headers = get_sections_for_student_with_http_info(id, opts) return 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 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] def get_sections_for_teacher(id, opts = {}) data, _status_code, _headers = get_sections_for_teacher_with_http_info(id, opts) return 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 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 a specific student # @param id # @param [Hash] opts the optional parameters # @return [StudentResponse] def get_student(id, opts = {}) data, _status_code, _headers = get_student_with_http_info(id, opts) return 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 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 the student for a student contact # @param id # @param [Hash] opts the optional parameters # @return [StudentResponse] def get_student_for_contact(id, opts = {}) data, _status_code, _headers = get_student_for_contact_with_http_info(id, opts) return data end # # Returns the student for a student contact # @param id # @param [Hash] opts the optional parameters # @return [Array<(StudentResponse, Fixnum, Hash)>] StudentResponse data, response status code and response headers def get_student_for_contact_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_student_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_student_for_contact" end # resource path local_var_path = "/contacts/{id}/student".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_for_contact\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 # @return [StudentsResponse] def get_students(opts = {}) data, _status_code, _headers = get_students_with_http_info(opts) return data 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 # @return [Array<(StudentsResponse, Fixnum, Hash)>] StudentsResponse data, response status code and response headers def get_students_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_students ..." 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? # 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 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] def get_students_for_school(id, opts = {}) data, _status_code, _headers = get_students_for_school_with_http_info(id, opts) return 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 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] def get_students_for_section(id, opts = {}) data, _status_code, _headers = get_students_for_section_with_http_info(id, opts) return 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 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] def get_students_for_teacher(id, opts = {}) data, _status_code, _headers = get_students_for_teacher_with_http_info(id, opts) return 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 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 specific teacher # @param id # @param [Hash] opts the optional parameters # @return [TeacherResponse] def get_teacher(id, opts = {}) data, _status_code, _headers = get_teacher_with_http_info(id, opts) return data 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 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 the primary teacher for a section # @param id # @param [Hash] opts the optional parameters # @return [TeacherResponse] def get_teacher_for_section(id, opts = {}) data, _status_code, _headers = get_teacher_for_section_with_http_info(id, opts) return 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 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 list of teachers # @param [Hash] opts the optional parameters # @option opts [Integer] :limit # @option opts [String] :starting_after # @option opts [String] :ending_before # @return [TeachersResponse] def get_teachers(opts = {}) data, _status_code, _headers = get_teachers_with_http_info(opts) return data 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 # @return [Array<(TeachersResponse, Fixnum, Hash)>] TeachersResponse data, response status code and response headers def get_teachers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataApi.get_teachers ..." 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? # 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 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] def get_teachers_for_school(id, opts = {}) data, _status_code, _headers = get_teachers_for_school_with_http_info(id, opts) return 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 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] def get_teachers_for_section(id, opts = {}) data, _status_code, _headers = get_teachers_for_section_with_http_info(id, opts) return 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 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] def get_teachers_for_student(id, opts = {}) data, _status_code, _headers = get_teachers_for_student_with_http_info(id, opts) return 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 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 end end