Module: RoadmapSections
Instance Method Summary collapse
-
#create_checkpoint(id, options = {}) ⇒ Checkpoint
Create a checkpoint.
Methods included from BaseClient
#auth_header, #convert_keys, #convert_response, #handle_timeouts, #success?, #whitelist_params
Instance Method Details
#create_checkpoint(id, options = {}) ⇒ Checkpoint
Create a checkpoint
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/client/roadmap_sections.rb', line 18 def create_checkpoint(id, ={}) accepted_params = ['name', 'summary', 'body', 'assignment', 'points', 'body_and_assignment'] checkpoint_params = .select {|k, v| accepted_params.include?(k) } url = "#{@api_base_path}/roadmap_sections/#{id}/create_checkpoint" handle_timeouts do response = self.class.post(url, headers: auth_header, query: { checkpoint: checkpoint_params }) convert_response(response, "checkpoint") end end |