Skip to content

API v2 - add support for JSON arg input#132

Closed
yhwli wants to merge 3 commits intomainfrom
APIv2-json-input
Closed

API v2 - add support for JSON arg input#132
yhwli wants to merge 3 commits intomainfrom
APIv2-json-input

Conversation

@yhwli
Copy link
Contributor

@yhwli yhwli commented Apr 1, 2024

API v2 for Progress Report - JSON URL parameter
### Note: URL Parameter "class" is changed to "course" to maintain naming accuracy and consistency.

Usage:

Path: /

URL Parameters:
    school
    course
    student_mastery
    class_mastery

Path: /json

Content-Type: application/json
Data:
{
  "school": "Berkeley",
  "course": "CS10",
  "student_mastery": {
      "Abstraction": 4,
      "Number Representation": 4,
      "Iteration": 3,
      "Domain and Range": 4,
      "Booleans": 1,
      "Functions": 0,
      "HOFs I": 0
  },
  "class_mastery": {
      "Abstraction": 1,
      "Number Representation": 1,
      "Iteration": 1,
      "Domain and Range": 1,
      "Booleans": 1,
      "Functions": 0,
      "HOFs I": 0
  }

@yhwli yhwli requested a review from Connor-Bernard April 1, 2024 21:16
@yhwli yhwli added enhancement New feature or request BREAKING Something that is a breaking change labels Apr 1, 2024
@yhwli yhwli requested a review from Connor-Bernard April 10, 2024 19:11

def parse_json_mastery(school_name, course_name, student_mastery_json, class_mastery_json):
def assign_node_levels_json(node, student_levels_count, class_levels_count):
nonlocal student_mastery, class_mastery
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revise this to remove side effects and just return the student and class mastery

@Connor-Bernard
Copy link
Owner

Copied to new repo here

@Connor-Bernard Connor-Bernard deleted the APIv2-json-input branch September 28, 2024 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING Something that is a breaking change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants