Skip to content

Commit c75c2a9

Browse files
committed
fix: orgId query param
Seems like blocket uses camelCase for this one.
1 parent 7c030e9 commit c75c2a9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

blocket_api/blocket.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def search_car(
102102
"year_to": year_to,
103103
"milage_from": milage_from,
104104
"milage_to": milage_to,
105-
"org_id": org_id,
105+
"orgId": org_id,
106106
}
107107

108108
params = [QueryParam(k, v) for k, v in param_dict.items() if v is not None]
@@ -139,7 +139,7 @@ def search_boat(
139139
"price_to": price_to,
140140
"length_feet_from": length_from,
141141
"length_feet_to": length_to,
142-
"org_id": org_id,
142+
"orgId": org_id,
143143
}
144144

145145
params = [QueryParam(k, v) for k, v in param_dict.items() if v is not None]
@@ -174,7 +174,7 @@ def search_mc(
174174
"price_to": price_to,
175175
"engine_volume_from": engine_volume_from,
176176
"engine_volume_to": engine_volume_to,
177-
"org_id": org_id,
177+
"orgId": org_id,
178178
}
179179

180180
params = [QueryParam(k, v) for k, v in param_dict.items() if v is not None]

tests/requests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_search_car(self) -> None:
123123
"&price_from=1000"
124124
"&price_to=50000"
125125
"&transmission=2"
126-
"&org_id=1337"
126+
"&orgId=1337"
127127
)
128128
respx.get(expected_url).mock(
129129
return_value=httpx.Response(200, json={"status": "ok"})
@@ -153,7 +153,7 @@ def test_search_boat(self) -> None:
153153
"&price_to=90000"
154154
"&length_feet_from=10"
155155
"&length_feet_to=15"
156-
"&org_id=1337"
156+
"&orgId=1337"
157157
)
158158
respx.get(expected_url).mock(
159159
return_value=httpx.Response(200, json={"status": "ok"})
@@ -186,7 +186,7 @@ def test_search_mc(self) -> None:
186186
"&make=1484"
187187
"&location=0.300001"
188188
"&type=11"
189-
"&org_id=1337"
189+
"&orgId=1337"
190190
)
191191
respx.get(expected_url).mock(
192192
return_value=httpx.Response(200, json={"status": "ok"})

0 commit comments

Comments
 (0)