Skip to content

Commit 33fe4e4

Browse files
committed
update use-latest and use-list to include new category changes
1 parent a695998 commit 33fe4e4

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed

docs/API/using-the-api/Use-latest.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ Use the `/cached-latest` endpoint if you're making an app that does not require
1717
:::
1818

1919
#### Parameters:
20-
* `category` : `string`. Can have values (`general`, `ptm`, `exam`) [Mandatory]
20+
* `category` : `string`. Needs to be either (`general`, `ptm`, `exam`) or a BPS Category ID (int) [Mandatory]
2121

22-
The `category` parameter refers to one of the 3 main category of circulars on the
23-
BPS Website.
22+
The `category` parameter refers to any one of the categories of circulars on the BPS Website.
2423

24+
The category ID can be found in the URL of the circulars page of the BPS Website, like here `https://www.bpsdoha.net/circular/category/41-sample-question-papers`, 41 is the ID
25+
26+
Or if you want the to use one of the three main categories, you can use `general`, `ptm` or `exam` as the value of the `category` parameter, instead of a numeric ID
2527

2628
## Example Requests
2729

@@ -113,6 +115,21 @@ When getting circulars from the `exam` category, the response is a dictionary wi
113115
```
114116

115117

118+
</TabItem>
119+
<TabItem value="Empty Category" label="Empty Category">
120+
121+
Here's what you get when you try to get the data from an empty category.
122+
123+
```python
124+
{
125+
"status": "success",
126+
"http_status": 200,
127+
"data": [],
128+
"message": "There are no circulars in this category."
129+
}
130+
```
131+
132+
116133
</TabItem>
117134
</Tabs>
118135

docs/API/using-the-api/Use-list.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ This endpoint returns a JSON object containing the list of circulars in the cate
1212

1313

1414
#### Parameters:
15-
* `category` : `string`. Can have values (`general`, `ptm`, `exam`) [Mandatory]
15+
* `category` : `string`. Needs to be either (`general`, `ptm`, `exam`) or a BPS Category ID (int) [Mandatory]
16+
17+
The `category` parameter refers to any one of the categories of circulars on the BPS Website.
18+
19+
The category ID can be found in the URL of the circulars page of the BPS Website, like here `https://www.bpsdoha.net/circular/category/41-sample-question-papers`, 41 is the ID
20+
21+
Or if you want the to use one of the three main categories, you can use `general`, `ptm` or `exam` as the value of the `category` parameter, instead of a numeric ID
1622

17-
The `category` parameter refers to one of the 3 main category of circulars on the BPS Website.
1823

1924

2025

@@ -525,10 +530,25 @@ When getting circulars from the `exam` category, the response is a dictionary wi
525530

526531
</p>
527532
</details>
533+
</TabItem>
534+
<TabItem value="Empty Category" label="Empty Category">
535+
536+
Here's what you get when you try to get the data from an empty category.
537+
538+
```python
539+
{
540+
"status": "success",
541+
"http_status": 200,
542+
"data": [],
543+
"message": "There are no circulars in this category."
544+
}
545+
```
528546

529547

530548
</TabItem>
531549
</Tabs>
550+
551+
532552
---
533553

534554
Thanks for reading!

0 commit comments

Comments
 (0)