class FlatApi::ClassApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/flat_api/api/class_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

activate_class(_class, opts = {}) click to toggle source

Activate the class Mark the class as `active`. This is mainly used for classes synchronized from Clever that are initially with an `inactive` state and hidden in the UI. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [ClassDetails]

# File lib/flat_api/api/class_api.rb, line 28
def activate_class(_class, opts = {})
  data, _status_code, _headers = activate_class_with_http_info(_class, opts)
  return data
end
activate_class_with_http_info(_class, opts = {}) click to toggle source

Activate the class Mark the class as &#x60;active&#x60;. This is mainly used for classes synchronized from Clever that are initially with an &#x60;inactive&#x60; state and hidden in the UI. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 38
def activate_class_with_http_info(_class, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.activate_class ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.activate_class"
  end
  # resource path
  local_var_path = "/classes/{class}/activate".sub('{' + 'class' + '}', _class.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClassDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#activate_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
add_class_user(_class, user, opts = {}) click to toggle source

Add a user to the class This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. @param _class Unique identifier of the class @param user Unique identifier of the user @param [Hash] opts the optional parameters @return [nil]

# File lib/flat_api/api/class_api.rb, line 84
def add_class_user(_class, user, opts = {})
  add_class_user_with_http_info(_class, user, opts)
  return nil
end
add_class_user_with_http_info(_class, user, opts = {}) click to toggle source

Add a user to the class This method can be used by a teacher of the class to enroll another Flat user into the class. Only users that are part of your Organization can be enrolled in a class of this same Organization. When enrolling a user in the class, Flat will automatically add this user to the corresponding Class group, based on this role in the Organization. @param _class Unique identifier of the class @param user Unique identifier of the user @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 95
def add_class_user_with_http_info(_class, user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.add_class_user ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.add_class_user"
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.add_class_user"
  end
  # resource path
  local_var_path = "/classes/{class}/users/{user}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#add_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
archive_class(_class, opts = {}) click to toggle source

Archive the class Mark the class as `archived`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [ClassDetails]

# File lib/flat_api/api/class_api.rb, line 143
def archive_class(_class, opts = {})
  data, _status_code, _headers = archive_class_with_http_info(_class, opts)
  return data
end
archive_class_with_http_info(_class, opts = {}) click to toggle source

Archive the class Mark the class as &#x60;archived&#x60;. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 153
def archive_class_with_http_info(_class, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.archive_class ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.archive_class"
  end
  # resource path
  local_var_path = "/classes/{class}/archive".sub('{' + 'class' + '}', _class.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClassDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#archive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
copy_assignment(_class, assignment, body, opts = {}) click to toggle source

Copy an assignment Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. @param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param body @param [Hash] opts the optional parameters @return [Assignment]

# File lib/flat_api/api/class_api.rb, line 200
def copy_assignment(_class, assignment, body, opts = {})
  data, _status_code, _headers = copy_assignment_with_http_info(_class, assignment, body, opts)
  return data
end
copy_assignment_with_http_info(_class, assignment, body, opts = {}) click to toggle source

Copy an assignment Copy an assignment to a specified class. If the original assignment has a due date in the past, this new assingment will be created without a due date. If the new class is synchronized with an external app (e.g. Google Classroom), the copied assignment will also be posted on the external app. @param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param body @param [Hash] opts the optional parameters @return [Array<(Assignment, Fixnum, Hash)>] Assignment data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 212
def copy_assignment_with_http_info(_class, assignment, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.copy_assignment ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.copy_assignment"
  end
  # verify the required parameter 'assignment' is set
  if @api_client.config.client_side_validation && assignment.nil?
    fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.copy_assignment"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.copy_assignment"
  end
  # resource path
  local_var_path = "/classes/{class}/assignments/{assignment}/copy".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Assignment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#copy_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_assignment(_class, opts = {}) click to toggle source

Assignment creation Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @option opts [AssignmentCreation] :body @return [Assignment]

# File lib/flat_api/api/class_api.rb, line 266
def create_assignment(_class, opts = {})
  data, _status_code, _headers = create_assignment_with_http_info(_class, opts)
  return data
end
create_assignment_with_http_info(_class, opts = {}) click to toggle source

Assignment creation Use this method as a teacher to create and post a new assignment to a class. If the class is synchronized with Google Classroom, the assignment will be automatically posted to your Classroom course. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @option opts [AssignmentCreation] :body @return [Array<(Assignment, Fixnum, Hash)>] Assignment data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 277
def create_assignment_with_http_info(_class, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.create_assignment ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_assignment"
  end
  # resource path
  local_var_path = "/classes/{class}/assignments".sub('{' + 'class' + '}', _class.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Assignment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#create_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_class(body, opts = {}) click to toggle source

Create a new class Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using `POST /classes/{class}/users/{user}`, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using `POST /classes/enroll/{enrollmentCode}` and the `enrollmentCode` returned in the `ClassDetails` response. @param body @param [Hash] opts the optional parameters @return [ClassDetails]

# File lib/flat_api/api/class_api.rb, line 322
def create_class(body, opts = {})
  data, _status_code, _headers = create_class_with_http_info(body, opts)
  return data
end
create_class_with_http_info(body, opts = {}) click to toggle source

Create a new class Classrooms on Flat allow you to create activities with assignments and post content to a specific group. When creating a class, Flat automatically creates two groups: one for the teachers of the course, one for the students. The creator of this class is automatically added to the teachers group. If the classsroom is synchronized with another application like Google Classroom, some of the meta information will automatically be updated. You can add users to this class using &#x60;POST /classes/{class}/users/{user}&#x60;, they will automatically added to the group based on their role on Flat. Users can also enroll themselves to this class using &#x60;POST /classes/enroll/{enrollmentCode}&#x60; and the &#x60;enrollmentCode&#x60; returned in the &#x60;ClassDetails&#x60; response. @param body @param [Hash] opts the optional parameters @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 332
def create_class_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.create_class ..."
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_class"
  end
  # resource path
  local_var_path = "/classes"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClassDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#create_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_submission(_class, assignment, body, opts = {}) click to toggle source

Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment. Students can only set `attachments`, `studentComment` and `submit`. Teachers can use `PUT /classes/{class}/assignments/{assignment}/submissions/{submission}` to update a submission by id. @param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param body @param [Hash] opts the optional parameters @return [AssignmentSubmission]

# File lib/flat_api/api/class_api.rb, line 379
def create_submission(_class, assignment, body, opts = {})
  data, _status_code, _headers = create_submission_with_http_info(_class, assignment, body, opts)
  return data
end
create_submission_with_http_info(_class, assignment, body, opts = {}) click to toggle source

Create or edit a submission Use this method as a student to create, update and submit a submission related to an assignment. Students can only set &#x60;attachments&#x60;, &#x60;studentComment&#x60; and &#x60;submit&#x60;. Teachers can use &#x60;PUT /classes/{class}/assignments/{assignment}/submissions/{submission}&#x60; to update a submission by id. @param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param body @param [Hash] opts the optional parameters @return [Array<(AssignmentSubmission, Fixnum, Hash)>] AssignmentSubmission data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 391
def create_submission_with_http_info(_class, assignment, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.create_submission ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.create_submission"
  end
  # verify the required parameter 'assignment' is set
  if @api_client.config.client_side_validation && assignment.nil?
    fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.create_submission"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.create_submission"
  end
  # resource path
  local_var_path = "/classes/{class}/assignments/{assignment}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AssignmentSubmission')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#create_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_class_user(_class, user, opts = {}) click to toggle source

Remove a user from the class This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. @param _class Unique identifier of the class @param user Unique identifier of the user @param [Hash] opts the optional parameters @return [nil]

# File lib/flat_api/api/class_api.rb, line 445
def delete_class_user(_class, user, opts = {})
  delete_class_user_with_http_info(_class, user, opts)
  return nil
end
delete_class_user_with_http_info(_class, user, opts = {}) click to toggle source

Remove a user from the class This method can be used by a teacher to remove a user from the class, or by a student to leave the classroom. Warning: Removing a user from the class will remove the associated resources, including the submissions and feedback related to these submissions. @param _class Unique identifier of the class @param user Unique identifier of the user @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 456
def delete_class_user_with_http_info(_class, user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.delete_class_user ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.delete_class_user"
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.delete_class_user"
  end
  # resource path
  local_var_path = "/classes/{class}/users/{user}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#delete_class_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
edit_submission(_class, assignment, submission, body, opts = {}) click to toggle source

Edit a submission Use this method as a teacher to update the different submission and give feedback. Teachers can only set `returnFeedback` @param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param submission Unique identifier of the submission @param body @param [Hash] opts the optional parameters @return [AssignmentSubmission]

# File lib/flat_api/api/class_api.rb, line 507
def edit_submission(_class, assignment, submission, body, opts = {})
  data, _status_code, _headers = edit_submission_with_http_info(_class, assignment, submission, body, opts)
  return data
end
edit_submission_with_http_info(_class, assignment, submission, body, opts = {}) click to toggle source

Edit a submission Use this method as a teacher to update the different submission and give feedback. Teachers can only set &#x60;returnFeedback&#x60; @param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param submission Unique identifier of the submission @param body @param [Hash] opts the optional parameters @return [Array<(AssignmentSubmission, Fixnum, Hash)>] AssignmentSubmission data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 520
def edit_submission_with_http_info(_class, assignment, submission, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.edit_submission ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.edit_submission"
  end
  # verify the required parameter 'assignment' is set
  if @api_client.config.client_side_validation && assignment.nil?
    fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.edit_submission"
  end
  # verify the required parameter 'submission' is set
  if @api_client.config.client_side_validation && submission.nil?
    fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.edit_submission"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ClassApi.edit_submission"
  end
  # resource path
  local_var_path = "/classes/{class}/assignments/{assignment}/submissions/{submission}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s).sub('{' + 'submission' + '}', submission.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AssignmentSubmission')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#edit_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
enroll_class(enrollment_code, opts = {}) click to toggle source

Join a class Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the `ClassDetails` returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. @param enrollment_code The enrollment code, available to the teacher in &#x60;ClassDetails&#x60; @param [Hash] opts the optional parameters @return [ClassDetails]

# File lib/flat_api/api/class_api.rb, line 577
def enroll_class(enrollment_code, opts = {})
  data, _status_code, _headers = enroll_class_with_http_info(enrollment_code, opts)
  return data
end
enroll_class_with_http_info(enrollment_code, opts = {}) click to toggle source

Join a class Use this method to join a class using an enrollment code given one of the teacher of this class. This code is also available in the &#x60;ClassDetails&#x60; returned to the teachers when creating the class or listing / fetching a specific class. Flat will automatically add the user to the corresponding class group based on this role in the organization. @param enrollment_code The enrollment code, available to the teacher in &#x60;ClassDetails&#x60; @param [Hash] opts the optional parameters @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 587
def enroll_class_with_http_info(enrollment_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.enroll_class ..."
  end
  # verify the required parameter 'enrollment_code' is set
  if @api_client.config.client_side_validation && enrollment_code.nil?
    fail ArgumentError, "Missing the required parameter 'enrollment_code' when calling ClassApi.enroll_class"
  end
  # resource path
  local_var_path = "/classes/enroll/{enrollmentCode}".sub('{' + 'enrollmentCode' + '}', enrollment_code.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClassDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#enroll_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_class(_class, opts = {}) click to toggle source

Get the details of a single class

@param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [ClassDetails]

# File lib/flat_api/api/class_api.rb, line 632
def get_class(_class, opts = {})
  data, _status_code, _headers = get_class_with_http_info(_class, opts)
  return data
end
get_class_with_http_info(_class, opts = {}) click to toggle source

Get the details of a single class

@param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 642
def get_class_with_http_info(_class, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.get_class ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_class"
  end
  # resource path
  local_var_path = "/classes/{class}".sub('{' + 'class' + '}', _class.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'ClassDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#get_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_score_submissions(score, opts = {}) click to toggle source

List submissions related to the score This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;). @param [Hash] opts the optional parameters @return [Array<AssignmentSubmission>]

# File lib/flat_api/api/class_api.rb, line 687
def get_score_submissions(score, opts = {})
  data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
  return data
end
get_score_submissions_with_http_info(score, opts = {}) click to toggle source

List submissions related to the score This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document. @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;). @param [Hash] opts the optional parameters @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 697
def get_score_submissions_with_http_info(score, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.get_score_submissions ..."
  end
  # verify the required parameter 'score' is set
  if @api_client.config.client_side_validation && score.nil?
    fail ArgumentError, "Missing the required parameter 'score' when calling ClassApi.get_score_submissions"
  end
  # resource path
  local_var_path = "/scores/{score}/submissions".sub('{' + 'score' + '}', score.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Array<AssignmentSubmission>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_submission(_class, assignment, submission, opts = {}) click to toggle source

Get a student submission

@param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param submission Unique identifier of the submission @param [Hash] opts the optional parameters @return [AssignmentSubmission]

# File lib/flat_api/api/class_api.rb, line 744
def get_submission(_class, assignment, submission, opts = {})
  data, _status_code, _headers = get_submission_with_http_info(_class, assignment, submission, opts)
  return data
end
get_submission_with_http_info(_class, assignment, submission, opts = {}) click to toggle source

Get a student submission

@param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param submission Unique identifier of the submission @param [Hash] opts the optional parameters @return [Array<(AssignmentSubmission, Fixnum, Hash)>] AssignmentSubmission data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 756
def get_submission_with_http_info(_class, assignment, submission, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.get_submission ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submission"
  end
  # verify the required parameter 'assignment' is set
  if @api_client.config.client_side_validation && assignment.nil?
    fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submission"
  end
  # verify the required parameter 'submission' is set
  if @api_client.config.client_side_validation && submission.nil?
    fail ArgumentError, "Missing the required parameter 'submission' when calling ClassApi.get_submission"
  end
  # resource path
  local_var_path = "/classes/{class}/assignments/{assignment}/submissions/{submission}".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.to_s).sub('{' + 'submission' + '}', submission.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'AssignmentSubmission')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#get_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_submissions(_class, assignment, opts = {}) click to toggle source

List the students' submissions

@param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param [Hash] opts the optional parameters @return [Array<AssignmentSubmission>]

# File lib/flat_api/api/class_api.rb, line 810
def get_submissions(_class, assignment, opts = {})
  data, _status_code, _headers = get_submissions_with_http_info(_class, assignment, opts)
  return data
end
get_submissions_with_http_info(_class, assignment, opts = {}) click to toggle source

List the students&#39; submissions

@param _class Unique identifier of the class @param assignment Unique identifier of the assignment @param [Hash] opts the optional parameters @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 821
def get_submissions_with_http_info(_class, assignment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.get_submissions ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.get_submissions"
  end
  # verify the required parameter 'assignment' is set
  if @api_client.config.client_side_validation && assignment.nil?
    fail ArgumentError, "Missing the required parameter 'assignment' when calling ClassApi.get_submissions"
  end
  # resource path
  local_var_path = "/classes/{class}/assignments/{assignment}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'assignment' + '}', assignment.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Array<AssignmentSubmission>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#get_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_assignments(_class, opts = {}) click to toggle source

Assignments listing

@param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [Array<Assignment>]

# File lib/flat_api/api/class_api.rb, line 870
def list_assignments(_class, opts = {})
  data, _status_code, _headers = list_assignments_with_http_info(_class, opts)
  return data
end
list_assignments_with_http_info(_class, opts = {}) click to toggle source

Assignments listing

@param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [Array<(Array<Assignment>, Fixnum, Hash)>] Array<Assignment> data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 880
def list_assignments_with_http_info(_class, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.list_assignments ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_assignments"
  end
  # resource path
  local_var_path = "/classes/{class}/assignments".sub('{' + 'class' + '}', _class.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Array<Assignment>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_class_student_submissions(_class, user, opts = {}) click to toggle source

List the submissions for a student Use this method as a teacher to list all the assignment submissions sent by a student of the class @param _class Unique identifier of the class @param user Unique identifier of the user @param [Hash] opts the optional parameters @return [Array<AssignmentSubmission>]

# File lib/flat_api/api/class_api.rb, line 926
def list_class_student_submissions(_class, user, opts = {})
  data, _status_code, _headers = list_class_student_submissions_with_http_info(_class, user, opts)
  return data
end
list_class_student_submissions_with_http_info(_class, user, opts = {}) click to toggle source

List the submissions for a student Use this method as a teacher to list all the assignment submissions sent by a student of the class @param _class Unique identifier of the class @param user Unique identifier of the user @param [Hash] opts the optional parameters @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 937
def list_class_student_submissions_with_http_info(_class, user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.list_class_student_submissions ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.list_class_student_submissions"
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling ClassApi.list_class_student_submissions"
  end
  # resource path
  local_var_path = "/classes/{class}/students/{user}/submissions".sub('{' + 'class' + '}', _class.to_s).sub('{' + 'user' + '}', user.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Array<AssignmentSubmission>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#list_class_student_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_classes(opts = {}) click to toggle source

List the classes available for the current user

@param [Hash] opts the optional parameters @option opts [String] :state Filter the classes by state (default to active) @return [Array<ClassDetails>]

# File lib/flat_api/api/class_api.rb, line 986
def list_classes(opts = {})
  data, _status_code, _headers = list_classes_with_http_info(opts)
  return data
end
list_classes_with_http_info(opts = {}) click to toggle source

List the classes available for the current user

@param [Hash] opts the optional parameters @option opts [String] :state Filter the classes by state @return [Array<(Array<ClassDetails>, Fixnum, Hash)>] Array<ClassDetails> data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 996
def list_classes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.list_classes ..."
  end
  if @api_client.config.client_side_validation && opts[:'state'] && !['active', 'inactive', 'archived'].include?(opts[:'state'])
    fail ArgumentError, 'invalid value for "state", must be one of active, inactive, archived'
  end
  # resource path
  local_var_path = "/classes"

  # query parameters
  query_params = {}
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Array<ClassDetails>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#list_classes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
unarchive_class(_class, opts = {}) click to toggle source

Unarchive the class Mark the class as `active`. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [ClassDetails]

# File lib/flat_api/api/class_api.rb, line 1041
def unarchive_class(_class, opts = {})
  data, _status_code, _headers = unarchive_class_with_http_info(_class, opts)
  return data
end
unarchive_class_with_http_info(_class, opts = {}) click to toggle source

Unarchive the class Mark the class as &#x60;active&#x60;. When this course is synchronized with another app, like Google Classroom, this state will be automatically be updated. @param _class Unique identifier of the class @param [Hash] opts the optional parameters @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 1051
def unarchive_class_with_http_info(_class, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.unarchive_class ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.unarchive_class"
  end
  # resource path
  local_var_path = "/classes/{class}/archive".sub('{' + 'class' + '}', _class.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClassDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#unarchive_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_class(_class, opts = {}) click to toggle source

Update the class Update the meta information of the class @param _class Unique identifier of the class @param [Hash] opts the optional parameters @option opts [ClassUpdate] :body Details of the Class @return [ClassDetails]

# File lib/flat_api/api/class_api.rb, line 1097
def update_class(_class, opts = {})
  data, _status_code, _headers = update_class_with_http_info(_class, opts)
  return data
end
update_class_with_http_info(_class, opts = {}) click to toggle source

Update the class Update the meta information of the class @param _class Unique identifier of the class @param [Hash] opts the optional parameters @option opts [ClassUpdate] :body Details of the Class @return [Array<(ClassDetails, Fixnum, Hash)>] ClassDetails data, response status code and response headers

# File lib/flat_api/api/class_api.rb, line 1108
def update_class_with_http_info(_class, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ClassApi.update_class ..."
  end
  # verify the required parameter '_class' is set
  if @api_client.config.client_side_validation && _class.nil?
    fail ArgumentError, "Missing the required parameter '_class' when calling ClassApi.update_class"
  end
  # resource path
  local_var_path = "/classes/{class}".sub('{' + 'class' + '}', _class.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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClassDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#update_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end