File tree Expand file tree Collapse file tree 3 files changed +30
-15
lines changed Expand file tree Collapse file tree 3 files changed +30
-15
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,7 @@ curl -X 'GET' \
5151 ' https://bpsapi.rajtech.me/v1/cached-latest' \
5252 -H ' accept: application/json' \
5353 -H ' Content-Type: application/json' \
54- -d ' {
55- "category": "ptm",
56- }'
54+ -d ' {"category": "ptm"}'
5755```
5856
5957
Original file line number Diff line number Diff line change @@ -52,9 +52,7 @@ curl -X 'GET' \
5252 ' https://bpsapi.rajtech.me/v1/latest' \
5353 -H ' accept: application/json' \
5454 -H ' Content-Type: application/json' \
55- -d ' {
56- "category": "ptm",
57- }'
55+ -d ' {"category": "ptm"}'
5856```
5957
6058
Original file line number Diff line number Diff line change 11---
22sidebar_position : 3
33---
4+ import Tabs from "@theme/Tabs ";
5+ import TabItem from "@theme/TabItem ";
6+
47# Using /search Endpoint
58
69In this tutorial, we will be using the ` /search ` endpoint to get a circular's download URL and Title.
@@ -21,36 +24,52 @@ The `title` parameter refers to the circular name.
2124
2225## Example Requests
2326
24- Python
27+ <Tabs >
28+ <TabItem value =" python " label =" Python " default >
29+
30+ Here is an example request using Python's ` requests ` library:
2531
2632``` python
2733import requests
2834
29- url = " https://bpsapi.rajtech.me/v1/search/ "
35+ url = " https://bpsapi.rajtech.me/v1/search"
3036payload = {' title' : ' mobile' }
3137
3238request = requests.get(url, json = payload)
3339print (request.text)
3440```
3541
36- Curl
42+ </TabItem >
43+ <TabItem value =" curl " label =" cURL " >
44+
45+ Here is an example request using cURL:
3746
3847``` bash
3948curl -X ' GET' \
40- ' https://bpsapi.rajtech.me/v1/search/ ' \
49+ ' https://bpsapi.rajtech.me/v1/search' \
4150 -H ' accept: application/json' \
4251 -H ' Content-Type: application/json' \
4352 -d ' {"title": "mobile"}'
4453```
4554
46- ## Example Responses
55+
56+ </TabItem >
57+ </Tabs >
58+
59+
60+
61+ ## Example Response
4762
4863
4964``` python
50- [
51- " Mobile Phone Usage Policy" ,
52- " https://bpsdoha.com/circular/category/38-circular-ay-2022-23?download=1108:mobile-phone-usage-policy"
53- ]
65+ {
66+ " status" : " success" ,
67+ " http_status" : 200 ,
68+ " data" : {
69+ " title" : " Mobile Phone Usage Policy" ,
70+ " link" : " https://bpsdoha.com/circular/category/38-circular-ay-2022-23?download=1108"
71+ }
72+ }
5473```
5574---
5675
You can’t perform that action at this time.
0 commit comments