Skip to content

Commit 63e048a

Browse files
committed
qualification api docs
1 parent 61b9469 commit 63e048a

14 files changed

+71
-6
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"id": 24,
3+
"name": "A Level",
4+
"ranking": 2.0,
5+
"custom_to_branch": true
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"id": 24,
3+
"name": "A Level",
4+
"ranking": 20.0,
5+
"custom_to_branch": true
6+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import pprint, requests
2+
data = {"name": "A Level", "ranking":2}
3+
headers = {'Authorization': 'token <API KEY>'}
4+
r = requests.post('https://secure.tutorcruncher.com/api/qual_levels/',json=data, headers=headers)
5+
pprint.pprint(r.json())
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Delete a Qualification Level
2+
Deletes a Qualification Level created by the API key's Branch (custom_to_branch=True). Only the Qualification Level's unique id is required in the URL. Qualification Levels not created by the API key's Branch cannot be deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import pprint, requests
2+
headers = {'Authorization': 'token <API KEY>'}
3+
r = requests.delete('https://secure.tutorcruncher.com/api/qual_levels/<id>/', headers=headers)
4+
pprint.pprint(r.json())
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"id": 5,
3+
"name": "GCSE",
4+
"ranking": 14.0,
5+
"custom_to_branch": null
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Get a Qualification Level
2+
3+
Returns the details of an existing Qualification Level. You only need to specify the unique
4+
`id` of the Qualification Level to get the correct details.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import pprint, requests
2+
3+
headers = {'Authorization': 'token <API KEY>'}
4+
r = requests.get('https://secure.tutorcruncher.com/api/qual_levels/<id>/', headers=headers)
5+
pprint.pprint(r.json())

pages/qual-levels/list-all-qual-levels.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
{
77
"id": 5,
88
"name": "GCSE",
9-
"ranking": 14.0
9+
"ranking": 14.0,
10+
"custom_to_branch": null
1011
},
1112
...
1213
]
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
### List all Qualification Levels
22

3-
Returns of all the Qualification Levels found on your TutorCruncher account sorted by their `ids` with the
4-
largest id first.
3+
Returns all Qualification Levels, sorted by id in descending order (highest first). Includes Qualification Levels associated with the API key's Branch, as well as unassigned Qualification Levels (custom_to_branch = null). Qualification Levels linked to other Branches or marked as hidden for the API key's Branch are excluded.

0 commit comments

Comments
 (0)