Skip to content

Commit 222457d

Browse files
committed
updated doc strings
1 parent 9228c22 commit 222457d

11 files changed

+42
-60
lines changed

pages/contractor-skills/contractor-skills-object.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ attributes:
3131
-
3232
name: subject
3333
type: object
34-
description: The subject/skill details.
34+
description: The subject details.
3535
children:
3636
-
3737
name: id
@@ -52,7 +52,7 @@ attributes:
5252
-
5353
name: custom_to_branch
5454
type: bool
55-
description: Indicates whether the Subject is custom to a specific branch (True) or not (null).
55+
description: Indicates whether the Subject is custom to the API key's Branch (True), or shared across all Branches (null).
5656
-
5757
name: qual_level
5858
type: object
@@ -73,4 +73,4 @@ attributes:
7373
-
7474
name: custom_to_branch
7575
type: bool
76-
description: Indicates whether the Qualification Level is custom to a specific branch (True) or not (null).
76+
description: Indicates whether the Qualification Level is custom to the API key's Branch (True), or shared across all Branches (null).

pages/contractor-skills/contractor-skills.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ sections:
2424
response: /contractor-skills/get-a-contractor-skill.json
2525
-
2626
title: Create a Contractor Skill
27-
id: skill-add-to-a-contractor
28-
description: /contractor-skills/skill-add-to-a-contractor.md
29-
code: /contractor-skills/skill-add-to-a-contractor.py
27+
id: create-a-contractor-skills
28+
description: /contractor-skills/create-a-contractor-skill.md
29+
code: /contractor-skills/create-a-contractor-skill.py
3030
code_type: POST
3131
code_url: /api/contractor-skills/
32-
response: /contractor-skills/skill-add-to-a-contractor.json
32+
response: /contractor-skills/create-a-contractor-skill.json
3333
-
3434
title: Delete a Contractor Skill
3535
id: delete-a-contractor-skill
3636
description: /contractor-skills/delete-a-contractor-skill.md
3737
code: /contractor-skills/delete-a-contractor-skill.py
3838
code_type: DELETE
39-
code_url: /api/contractor-skills/<id>/
39+
code_url: /api/contractor-skills/<id>/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"id": 135,
3+
"contractor": {
4+
"id": 69,
5+
"first_name": "Billy",
6+
"last_name": "Holiday",
7+
"email": null,
8+
"url": "http://localhost:8000/api/contractors/69/"
9+
},
10+
"subject": {
11+
"id": 51,
12+
"name": "Religious Studies",
13+
"category_id": 8,
14+
"category_name": "Humanities",
15+
"custom_to_branch": null
16+
},
17+
"qual_level": {
18+
"id": 13,
19+
"name": "Key Stage 5",
20+
"ranking": 35.0,
21+
"custom_to_branch": null
22+
}
23+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Add a Contractor Skill
2+
3+
Creates a new Contractor Skill, representing a relationship between a Contractor and a combination of [Subject](#subjects) and [Qualification Level](#qual-levels). You need to provide the `contractor`, `subject`, and `qual_level` IDs in the request body. Subjects or Qualification Levels custom to another branch, hidden for the branch, or added specifically by the Contractor cannot be used. For more information about what “custom to branch” means, see [Subject](#subjects) and [Qualification Level](#qual-levels).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import pprint, requests
2+
data = {"contractor": 69,"subject": 51,"qual_level": 13}
3+
headers = {'Authorization': 'token <API KEY>'}
4+
r = requests.post('https://secure.tutorcruncher.com/api/contractor-skills/',json=data, headers=headers)
5+
pprint.pprint(r.json())
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
### Delete a Contractor Skill
22

3-
Deletes an existing Contractor Skill. You only need to specify the unique `id` of the Contractor Skill.
4-
5-
If the specified Contractor Skill ID does not exist, a 404 response will be returned.
6-
7-
A successful deletion returns a 204 response with no content.
3+
Deletes a Contractor Skill using its unique ID. Only Contractor Skills associated with the API key's Branch can be deleted. Attempts to delete a skill that belongs to a different Branch or references a Subject or Qualification Level hidden or restricted for the Branch will result in a `400 Bad Request` response. For more information about Branch-specific restrictions, see [Subject](#subjects) and [Qualification Level](#qual-levels).
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
### Get a Contractor Skill
22

33
Returns the details of an existing Contractor Skill. You only need to specify the unique `id` of the Contractor Skill to get the correct details.
4-
5-
The response includes the full Contractor Skill object including the Contractor details, [Subject](#subjects) and [Qualification Level](#qual-level).
4+
The response includes the full Contractor Skill object including the Contractor details, [Subject](#subjects) and [Qualification Level](#qual-level).
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
### List all Contractor Skills
2+
Returns a list of Contractor Skills, each representing a relationship between a Contractor and a combination of [Subject](#subjects) and [Qualification Level](#qual-levels). The results include only skills that are custom to the API key's Branch, exclude skills with hidden Subjects or Qualification Levels for the Branch, and include skills specifically added by the Contractor. If no skills match the filtering criteria, the response will return an empty results array. For more information about what "custom to branch" means, see [Subject](#subjects) and [Qualification Level](#qual-levels).
23

3-
Returns a list of Contractor Skills. Each Contractor Skill represents a relationship between a Contractor and a combination of [Subject](#subjects) and [Qualification Level](#qual-levels).
4-
5-
The response includes the full details of each Contractor Skill including Contractor information, Subject details, and Qualification Level data.

pages/contractor-skills/skill-add-to-a-contractor.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

pages/contractor-skills/skill-add-to-a-contractor.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)