Skip to content

Commit 9b78f7b

Browse files
committed
Add subject cat docs
1 parent 3291c7d commit 9b78f7b

File tree

7 files changed

+55
-0
lines changed

7 files changed

+55
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"count": 2,
3+
"next": null,
4+
"previous": null,
5+
"results": [
6+
{
7+
"id": 50,
8+
"name": "Maths"
9+
},
10+
{
11+
"id": 51,
12+
"name": "Science"
13+
}
14+
]
15+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### List all Subject Categories
2+
3+
Returns of all the Subject Categories found on your TutorCruncher account, which are sorted by `id`.
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/subject_categories/', headers=headers)
5+
pprint.pprint(r.json())
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"id": 51,
3+
"name": "Science"
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Subject Category Object
2+
3+
The Subject Category includes the id and name of the Subject Category.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
attributes:
2+
-
3+
name: id
4+
type: integer
5+
description: Unique identifier for the object.
6+
-
7+
name: name
8+
type: string
9+
description: Name of the subject category.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sections:
2+
-
3+
title: Subject Category Object
4+
id: subject-category-object
5+
description: /subject_categories/subject-category-object.md
6+
attributes: /subject_categories/subject-category-object.yml
7+
response: /subject_categories/subject-category-object.json
8+
response_title: OBJECT
9+
-
10+
title: List all Subject Categories
11+
id: list-all-subject-categories
12+
description: /subject_categories/list-all-subject-categories.md
13+
code: /subject_categories/list-all-subject-categories.py
14+
code_type: GET
15+
code_url: /api/subject_categories/
16+
response: /subject_categories/list-all-subject-categories.json

0 commit comments

Comments
 (0)