Skip to content

Statistics

Alexandru Clapa edited this page Mar 22, 2017 · 4 revisions

Getting average score for quizzes in each group created by user (Authenticated resource)

GET request to https://project-run.herokuapp.com/statistics/average_marks_groups Response:

[
  {
    "group_id": 1,
    "group_name": "My first group",
    "average": 5.5
  },
  {
    "group_id": 2,
    "group_name": "My second group",
    "average": 3
  }
]

Getting average marks for quizzes in each group the user is in

GET request to https://project-run.herokuapp.com/statistics/marks_groups_quizzes Response:

[
  {
    "group_id": 4,
    "group_name": "test-group",
    "marks": null
  },
  {
    "group_id": 9,
    "group_name": "test-group 3",
    "marks": null
  },
  {
    "group_id": 10,
    "group_name": "testing groups",
    "marks": {
      "13": [
        {
          "quiz_id": 13,
          "quiz_title": "Title",
          "score": 1
        }
      ]
    }
  }
]

Clone this wiki locally