Skip to content

Instantly share code, notes, and snippets.

@pravj
Created April 16, 2015 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pravj/f1db5a82b87ab09bcce7 to your computer and use it in GitHub Desktop.
Save pravj/f1db5a82b87ab09bcce7 to your computer and use it in GitHub Desktop.

There is a sub-section named "Paging"[1] in the "Data API" section. It explains the Metadata in API responses, so I used this for my answer here.

I used Python's "requests" to communicate with the sandbox API. Below, I'm adding the "paging" response I got for both the endpoints, "students" and "sections".

Students {u'current': 1, u'count': 1004, u'total': 11}

Sections {u'current': 1, u'count': 382, u'total': 4}

As the API docs explains, the 'count' stands for total number of entries the pagination will result in, so average number of students per section will be 1004/382 here.

Now, statistically this will be ~2.63 students per section but I wonder how can you have 63% of a student in a section and 37% in another.

[1] https://clever.com/developers/docs#data-api-overview-paging-section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment