Module: Mentors

Included in:
Spartacus
Defined in:
lib/client/mentors.rb

Instance Method Summary collapse

Instance Method Details

#mark_mentor_assessment_read(id, assessment_id) ⇒ Object


26
27
28
29
30
31
32
# File 'lib/client/mentors.rb', line 26

def mark_mentor_assessment_read(id, assessment_id)
  url = "#{@api_base_path}/mentors/#{id}/mark_assessment_read/"
  handle_timeouts do
    response = self.class.get(url, headers: auth_header, assessment_id: assessment_id)
    convert_response(response, "assessments")
  end
end

#mentor_assssments(id) ⇒ Object


18
19
20
21
22
23
24
# File 'lib/client/mentors.rb', line 18

def mentor_assssments(id)
  url = "#{@api_base_path}/mentors/#{id}/assessments/"
  handle_timeouts do
    response = self.class.get(url, headers: auth_header)
    convert_response(response, "assessments")
  end
end

#mentor_paychecks(id) ⇒ Object


10
11
12
13
14
15
16
# File 'lib/client/mentors.rb', line 10

def mentor_paychecks(id)
  url = "#{@api_base_path}/mentors/#{id}/paychecks/"
  handle_timeouts do
    response = self.class.get(url, headers: auth_header)
    convert_response(response, "paychecks")
  end
end

#mentor_students(id) ⇒ Object


34
35
36
37
38
39
40
41
42
# File 'lib/client/mentors.rb', line 34

def mentor_students(id)
  url = "#{@api_base_path}/mentors/#{id}/students/"
  handle_timeouts do
    response = self.class.get(url, headers: auth_header)
    response = HTTParty::Response.new(response.request, response, response.parsed_response, { body: response["data"] })

    convert_response(response, "user")
  end
end

#mentorsObject


2
3
4
5
6
7
8
# File 'lib/client/mentors.rb', line 2

def mentors
  url = "#{@api_base_path}/mentors/"
  handle_timeouts do
    response = self.class.get(url, headers: auth_header)
    convert_response(response, "user")
  end
end