|
17 | 17 |
|
18 | 18 | from githubkit.compat import model_dump, type_validate_python |
19 | 19 | from githubkit.typing import Missing, UnsetType |
20 | | -from githubkit.utils import UNSET, exclude_unset |
| 20 | +from githubkit.utils import UNSET, exclude_unset, parse_query_params |
21 | 21 |
|
22 | 22 | if TYPE_CHECKING: |
23 | 23 | from datetime import datetime |
@@ -113,7 +113,7 @@ def list_public_events( |
113 | 113 | return self._github.request( |
114 | 114 | "GET", |
115 | 115 | url, |
116 | | - params=exclude_unset(params), |
| 116 | + params=exclude_unset(parse_query_params(params)), |
117 | 117 | headers=exclude_unset(headers), |
118 | 118 | stream=stream, |
119 | 119 | response_model=list[Event], |
@@ -159,7 +159,7 @@ async def async_list_public_events( |
159 | 159 | return await self._github.arequest( |
160 | 160 | "GET", |
161 | 161 | url, |
162 | | - params=exclude_unset(params), |
| 162 | + params=exclude_unset(parse_query_params(params)), |
163 | 163 | headers=exclude_unset(headers), |
164 | 164 | stream=stream, |
165 | 165 | response_model=list[Event], |
@@ -287,7 +287,7 @@ def list_public_events_for_repo_network( |
287 | 287 | return self._github.request( |
288 | 288 | "GET", |
289 | 289 | url, |
290 | | - params=exclude_unset(params), |
| 290 | + params=exclude_unset(parse_query_params(params)), |
291 | 291 | headers=exclude_unset(headers), |
292 | 292 | stream=stream, |
293 | 293 | response_model=list[Event], |
@@ -331,7 +331,7 @@ async def async_list_public_events_for_repo_network( |
331 | 331 | return await self._github.arequest( |
332 | 332 | "GET", |
333 | 333 | url, |
334 | | - params=exclude_unset(params), |
| 334 | + params=exclude_unset(parse_query_params(params)), |
335 | 335 | headers=exclude_unset(headers), |
336 | 336 | stream=stream, |
337 | 337 | response_model=list[Event], |
@@ -380,7 +380,7 @@ def list_notifications_for_authenticated_user( |
380 | 380 | return self._github.request( |
381 | 381 | "GET", |
382 | 382 | url, |
383 | | - params=exclude_unset(params), |
| 383 | + params=exclude_unset(parse_query_params(params)), |
384 | 384 | headers=exclude_unset(headers), |
385 | 385 | stream=stream, |
386 | 386 | response_model=list[Thread], |
@@ -430,7 +430,7 @@ async def async_list_notifications_for_authenticated_user( |
430 | 430 | return await self._github.arequest( |
431 | 431 | "GET", |
432 | 432 | url, |
433 | | - params=exclude_unset(params), |
| 433 | + params=exclude_unset(parse_query_params(params)), |
434 | 434 | headers=exclude_unset(headers), |
435 | 435 | stream=stream, |
436 | 436 | response_model=list[Thread], |
@@ -1090,7 +1090,7 @@ def list_public_org_events( |
1090 | 1090 | return self._github.request( |
1091 | 1091 | "GET", |
1092 | 1092 | url, |
1093 | | - params=exclude_unset(params), |
| 1093 | + params=exclude_unset(parse_query_params(params)), |
1094 | 1094 | headers=exclude_unset(headers), |
1095 | 1095 | stream=stream, |
1096 | 1096 | response_model=list[Event], |
@@ -1129,7 +1129,7 @@ async def async_list_public_org_events( |
1129 | 1129 | return await self._github.arequest( |
1130 | 1130 | "GET", |
1131 | 1131 | url, |
1132 | | - params=exclude_unset(params), |
| 1132 | + params=exclude_unset(parse_query_params(params)), |
1133 | 1133 | headers=exclude_unset(headers), |
1134 | 1134 | stream=stream, |
1135 | 1135 | response_model=list[Event], |
@@ -1169,7 +1169,7 @@ def list_repo_events( |
1169 | 1169 | return self._github.request( |
1170 | 1170 | "GET", |
1171 | 1171 | url, |
1172 | | - params=exclude_unset(params), |
| 1172 | + params=exclude_unset(parse_query_params(params)), |
1173 | 1173 | headers=exclude_unset(headers), |
1174 | 1174 | stream=stream, |
1175 | 1175 | response_model=list[Event], |
@@ -1209,7 +1209,7 @@ async def async_list_repo_events( |
1209 | 1209 | return await self._github.arequest( |
1210 | 1210 | "GET", |
1211 | 1211 | url, |
1212 | | - params=exclude_unset(params), |
| 1212 | + params=exclude_unset(parse_query_params(params)), |
1213 | 1213 | headers=exclude_unset(headers), |
1214 | 1214 | stream=stream, |
1215 | 1215 | response_model=list[Event], |
@@ -1256,7 +1256,7 @@ def list_repo_notifications_for_authenticated_user( |
1256 | 1256 | return self._github.request( |
1257 | 1257 | "GET", |
1258 | 1258 | url, |
1259 | | - params=exclude_unset(params), |
| 1259 | + params=exclude_unset(parse_query_params(params)), |
1260 | 1260 | headers=exclude_unset(headers), |
1261 | 1261 | stream=stream, |
1262 | 1262 | response_model=list[Thread], |
@@ -1303,7 +1303,7 @@ async def async_list_repo_notifications_for_authenticated_user( |
1303 | 1303 | return await self._github.arequest( |
1304 | 1304 | "GET", |
1305 | 1305 | url, |
1306 | | - params=exclude_unset(params), |
| 1306 | + params=exclude_unset(parse_query_params(params)), |
1307 | 1307 | headers=exclude_unset(headers), |
1308 | 1308 | stream=stream, |
1309 | 1309 | response_model=list[Thread], |
@@ -1507,7 +1507,7 @@ def list_stargazers_for_repo( |
1507 | 1507 | return self._github.request( |
1508 | 1508 | "GET", |
1509 | 1509 | url, |
1510 | | - params=exclude_unset(params), |
| 1510 | + params=exclude_unset(parse_query_params(params)), |
1511 | 1511 | headers=exclude_unset(headers), |
1512 | 1512 | stream=stream, |
1513 | 1513 | response_model=Union[list[SimpleUser], list[Stargazer]], |
@@ -1558,7 +1558,7 @@ async def async_list_stargazers_for_repo( |
1558 | 1558 | return await self._github.arequest( |
1559 | 1559 | "GET", |
1560 | 1560 | url, |
1561 | | - params=exclude_unset(params), |
| 1561 | + params=exclude_unset(parse_query_params(params)), |
1562 | 1562 | headers=exclude_unset(headers), |
1563 | 1563 | stream=stream, |
1564 | 1564 | response_model=Union[list[SimpleUser], list[Stargazer]], |
@@ -1600,7 +1600,7 @@ def list_watchers_for_repo( |
1600 | 1600 | return self._github.request( |
1601 | 1601 | "GET", |
1602 | 1602 | url, |
1603 | | - params=exclude_unset(params), |
| 1603 | + params=exclude_unset(parse_query_params(params)), |
1604 | 1604 | headers=exclude_unset(headers), |
1605 | 1605 | stream=stream, |
1606 | 1606 | response_model=list[SimpleUser], |
@@ -1639,7 +1639,7 @@ async def async_list_watchers_for_repo( |
1639 | 1639 | return await self._github.arequest( |
1640 | 1640 | "GET", |
1641 | 1641 | url, |
1642 | | - params=exclude_unset(params), |
| 1642 | + params=exclude_unset(parse_query_params(params)), |
1643 | 1643 | headers=exclude_unset(headers), |
1644 | 1644 | stream=stream, |
1645 | 1645 | response_model=list[SimpleUser], |
@@ -1942,7 +1942,7 @@ def list_repos_starred_by_authenticated_user( |
1942 | 1942 | return self._github.request( |
1943 | 1943 | "GET", |
1944 | 1944 | url, |
1945 | | - params=exclude_unset(params), |
| 1945 | + params=exclude_unset(parse_query_params(params)), |
1946 | 1946 | headers=exclude_unset(headers), |
1947 | 1947 | stream=stream, |
1948 | 1948 | response_model=list[Repository], |
@@ -1991,7 +1991,7 @@ async def async_list_repos_starred_by_authenticated_user( |
1991 | 1991 | return await self._github.arequest( |
1992 | 1992 | "GET", |
1993 | 1993 | url, |
1994 | | - params=exclude_unset(params), |
| 1994 | + params=exclude_unset(parse_query_params(params)), |
1995 | 1995 | headers=exclude_unset(headers), |
1996 | 1996 | stream=stream, |
1997 | 1997 | response_model=list[Repository], |
@@ -2242,7 +2242,7 @@ def list_watched_repos_for_authenticated_user( |
2242 | 2242 | return self._github.request( |
2243 | 2243 | "GET", |
2244 | 2244 | url, |
2245 | | - params=exclude_unset(params), |
| 2245 | + params=exclude_unset(parse_query_params(params)), |
2246 | 2246 | headers=exclude_unset(headers), |
2247 | 2247 | stream=stream, |
2248 | 2248 | response_model=list[MinimalRepository], |
@@ -2283,7 +2283,7 @@ async def async_list_watched_repos_for_authenticated_user( |
2283 | 2283 | return await self._github.arequest( |
2284 | 2284 | "GET", |
2285 | 2285 | url, |
2286 | | - params=exclude_unset(params), |
| 2286 | + params=exclude_unset(parse_query_params(params)), |
2287 | 2287 | headers=exclude_unset(headers), |
2288 | 2288 | stream=stream, |
2289 | 2289 | response_model=list[MinimalRepository], |
@@ -2328,7 +2328,7 @@ def list_events_for_authenticated_user( |
2328 | 2328 | return self._github.request( |
2329 | 2329 | "GET", |
2330 | 2330 | url, |
2331 | | - params=exclude_unset(params), |
| 2331 | + params=exclude_unset(parse_query_params(params)), |
2332 | 2332 | headers=exclude_unset(headers), |
2333 | 2333 | stream=stream, |
2334 | 2334 | response_model=list[Event], |
@@ -2369,7 +2369,7 @@ async def async_list_events_for_authenticated_user( |
2369 | 2369 | return await self._github.arequest( |
2370 | 2370 | "GET", |
2371 | 2371 | url, |
2372 | | - params=exclude_unset(params), |
| 2372 | + params=exclude_unset(parse_query_params(params)), |
2373 | 2373 | headers=exclude_unset(headers), |
2374 | 2374 | stream=stream, |
2375 | 2375 | response_model=list[Event], |
@@ -2411,7 +2411,7 @@ def list_org_events_for_authenticated_user( |
2411 | 2411 | return self._github.request( |
2412 | 2412 | "GET", |
2413 | 2413 | url, |
2414 | | - params=exclude_unset(params), |
| 2414 | + params=exclude_unset(parse_query_params(params)), |
2415 | 2415 | headers=exclude_unset(headers), |
2416 | 2416 | stream=stream, |
2417 | 2417 | response_model=list[Event], |
@@ -2453,7 +2453,7 @@ async def async_list_org_events_for_authenticated_user( |
2453 | 2453 | return await self._github.arequest( |
2454 | 2454 | "GET", |
2455 | 2455 | url, |
2456 | | - params=exclude_unset(params), |
| 2456 | + params=exclude_unset(parse_query_params(params)), |
2457 | 2457 | headers=exclude_unset(headers), |
2458 | 2458 | stream=stream, |
2459 | 2459 | response_model=list[Event], |
@@ -2492,7 +2492,7 @@ def list_public_events_for_user( |
2492 | 2492 | return self._github.request( |
2493 | 2493 | "GET", |
2494 | 2494 | url, |
2495 | | - params=exclude_unset(params), |
| 2495 | + params=exclude_unset(parse_query_params(params)), |
2496 | 2496 | headers=exclude_unset(headers), |
2497 | 2497 | stream=stream, |
2498 | 2498 | response_model=list[Event], |
@@ -2531,7 +2531,7 @@ async def async_list_public_events_for_user( |
2531 | 2531 | return await self._github.arequest( |
2532 | 2532 | "GET", |
2533 | 2533 | url, |
2534 | | - params=exclude_unset(params), |
| 2534 | + params=exclude_unset(parse_query_params(params)), |
2535 | 2535 | headers=exclude_unset(headers), |
2536 | 2536 | stream=stream, |
2537 | 2537 | response_model=list[Event], |
@@ -2573,7 +2573,7 @@ def list_received_events_for_user( |
2573 | 2573 | return self._github.request( |
2574 | 2574 | "GET", |
2575 | 2575 | url, |
2576 | | - params=exclude_unset(params), |
| 2576 | + params=exclude_unset(parse_query_params(params)), |
2577 | 2577 | headers=exclude_unset(headers), |
2578 | 2578 | stream=stream, |
2579 | 2579 | response_model=list[Event], |
@@ -2615,7 +2615,7 @@ async def async_list_received_events_for_user( |
2615 | 2615 | return await self._github.arequest( |
2616 | 2616 | "GET", |
2617 | 2617 | url, |
2618 | | - params=exclude_unset(params), |
| 2618 | + params=exclude_unset(parse_query_params(params)), |
2619 | 2619 | headers=exclude_unset(headers), |
2620 | 2620 | stream=stream, |
2621 | 2621 | response_model=list[Event], |
@@ -2654,7 +2654,7 @@ def list_received_public_events_for_user( |
2654 | 2654 | return self._github.request( |
2655 | 2655 | "GET", |
2656 | 2656 | url, |
2657 | | - params=exclude_unset(params), |
| 2657 | + params=exclude_unset(parse_query_params(params)), |
2658 | 2658 | headers=exclude_unset(headers), |
2659 | 2659 | stream=stream, |
2660 | 2660 | response_model=list[Event], |
@@ -2693,7 +2693,7 @@ async def async_list_received_public_events_for_user( |
2693 | 2693 | return await self._github.arequest( |
2694 | 2694 | "GET", |
2695 | 2695 | url, |
2696 | | - params=exclude_unset(params), |
| 2696 | + params=exclude_unset(parse_query_params(params)), |
2697 | 2697 | headers=exclude_unset(headers), |
2698 | 2698 | stream=stream, |
2699 | 2699 | response_model=list[Event], |
@@ -2744,7 +2744,7 @@ def list_repos_starred_by_user( |
2744 | 2744 | return self._github.request( |
2745 | 2745 | "GET", |
2746 | 2746 | url, |
2747 | | - params=exclude_unset(params), |
| 2747 | + params=exclude_unset(parse_query_params(params)), |
2748 | 2748 | headers=exclude_unset(headers), |
2749 | 2749 | stream=stream, |
2750 | 2750 | response_model=Union[list[StarredRepository], list[Repository]], |
@@ -2795,7 +2795,7 @@ async def async_list_repos_starred_by_user( |
2795 | 2795 | return await self._github.arequest( |
2796 | 2796 | "GET", |
2797 | 2797 | url, |
2798 | | - params=exclude_unset(params), |
| 2798 | + params=exclude_unset(parse_query_params(params)), |
2799 | 2799 | headers=exclude_unset(headers), |
2800 | 2800 | stream=stream, |
2801 | 2801 | response_model=Union[list[StarredRepository], list[Repository]], |
@@ -2833,7 +2833,7 @@ def list_repos_watched_by_user( |
2833 | 2833 | return self._github.request( |
2834 | 2834 | "GET", |
2835 | 2835 | url, |
2836 | | - params=exclude_unset(params), |
| 2836 | + params=exclude_unset(parse_query_params(params)), |
2837 | 2837 | headers=exclude_unset(headers), |
2838 | 2838 | stream=stream, |
2839 | 2839 | response_model=list[MinimalRepository], |
@@ -2871,7 +2871,7 @@ async def async_list_repos_watched_by_user( |
2871 | 2871 | return await self._github.arequest( |
2872 | 2872 | "GET", |
2873 | 2873 | url, |
2874 | | - params=exclude_unset(params), |
| 2874 | + params=exclude_unset(parse_query_params(params)), |
2875 | 2875 | headers=exclude_unset(headers), |
2876 | 2876 | stream=stream, |
2877 | 2877 | response_model=list[MinimalRepository], |
|
0 commit comments