gitcode-api 1.2.18__tar.gz → 1.2.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/PKG-INFO +2 -2
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/README.md +1 -1
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/_base_client.py +1 -1
- gitcode_api-1.2.20/gitcode_api/constants.py +25 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/resources/_shared.py +17 -14
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/resources/account.py +85 -16
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/resources/collaboration.py +175 -34
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/resources/repositories.py +277 -48
- gitcode_api-1.2.20/gitcode_api/version.txt +1 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api.egg-info/PKG-INFO +2 -2
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/pyproject.toml +4 -1
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_collaboration_templates.py +90 -1
- gitcode_api-1.2.18/gitcode_api/constants.py +0 -8
- gitcode_api-1.2.18/gitcode_api/version.txt +0 -1
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/LICENSE +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/__init__.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/__main__.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/_base_resource.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/_cli_banner.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/_client.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/_exceptions.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/_models.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/cli.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/llm/__init__.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/llm/_tool.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/llm/jiuwen.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/llm/mcp.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/llm/openai.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/py.typed +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/resources/__init__.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/resources/misc.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/run_mcp.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api/utils.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api.egg-info/SOURCES.txt +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api.egg-info/dependency_links.txt +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api.egg-info/entry_points.txt +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api.egg-info/requires.txt +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/gitcode_api.egg-info/top_level.txt +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/setup.cfg +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_base_client.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_build_manifest.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_cli.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_client.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_llm_tools.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_models.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_resources_account.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_resources_collaboration.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_resources_misc.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_resources_repositories.py +0 -0
- {gitcode_api-1.2.18 → gitcode_api-1.2.20}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitcode-api
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.20
|
|
4
4
|
Summary: Easy to use Python SDK for the GitCode REST API. Providing builtin CLI tool, and optional LLM integration (MCP, OpenAI tool, and openJiuwen tool) for agents. Community-maintained.
|
|
5
5
|
Author-email: Hugo Huang <hugo@hugohuang.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -37,7 +37,7 @@ Dynamic: license-file
|
|
|
37
37
|
|
|
38
38
|
# GitCode-API
|
|
39
39
|
|
|
40
|
-
[](https://pypi.org/project/gitcode-api) [](https://pepy.tech/projects/gitcode-api) [](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
|
|
41
41
|
[](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
|
|
42
42
|
[](https://github.com/Trenza1ore/GitCode-API) [](https://gitcode.com/SushiNinja/GitCode-API)
|
|
43
43
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GitCode-API
|
|
2
2
|
|
|
3
|
-
[](https://pypi.org/project/gitcode-api) [](https://pepy.tech/projects/gitcode-api) [](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
|
|
4
4
|
[](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
|
|
5
5
|
[](https://github.com/Trenza1ore/GitCode-API) [](https://gitcode.com/SushiNinja/GitCode-API)
|
|
6
6
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Shared constant values for the GitCode SDK."""
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
DEFAULT_BASE_URL = "https://api.gitcode.com/api/v5"
|
|
6
|
+
DEFAULT_TIMEOUT = 30.0
|
|
7
|
+
DEFAULT_TOKEN_ENV = "GITCODE_ACCESS_TOKEN"
|
|
8
|
+
DEFAULT_CA_ENV = "GITCODE_CA_BUNDLE"
|
|
9
|
+
GITCODE_ISSUE_TEMPLATE_PATH_RE: re.Pattern[str] = re.compile(
|
|
10
|
+
r"\.git(code|hub)/ISSUE_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
|
|
11
|
+
)
|
|
12
|
+
GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE: re.Pattern[str] = re.compile(
|
|
13
|
+
r"\.git(code|hub)/PULL_REQUEST_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
|
|
14
|
+
)
|
|
15
|
+
GITCODE_TEMPLATE_REPO = ".gitcode"
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"DEFAULT_BASE_URL",
|
|
19
|
+
"DEFAULT_TIMEOUT",
|
|
20
|
+
"DEFAULT_TOKEN_ENV",
|
|
21
|
+
"DEFAULT_CA_ENV",
|
|
22
|
+
"GITCODE_ISSUE_TEMPLATE_PATH_RE",
|
|
23
|
+
"GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE",
|
|
24
|
+
"GITCODE_TEMPLATE_REPO",
|
|
25
|
+
]
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
"""Shared resource base classes for the GitCode SDK."""
|
|
2
2
|
|
|
3
|
-
import re
|
|
4
3
|
from typing import Any, Dict, List, Optional, Pattern, Tuple, Union
|
|
5
4
|
|
|
6
5
|
from .._base_client import AsyncAPIClient, SyncAPIClient
|
|
7
6
|
from .._base_resource import BaseResource
|
|
8
7
|
from .._exceptions import GitCodeHTTPStatusError
|
|
9
8
|
from .._models import APIObject, ModelT, as_model, as_model_list
|
|
10
|
-
|
|
11
|
-
GITCODE_ISSUE_TEMPLATE_PATH_RE: Pattern[str] = re.compile(
|
|
12
|
-
r"\.gitcode/ISSUE_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
|
|
13
|
-
)
|
|
14
|
-
GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE: Pattern[str] = re.compile(
|
|
15
|
-
r"\.gitcode/PULL_REQUEST_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
|
|
16
|
-
)
|
|
9
|
+
from ..constants import GITCODE_TEMPLATE_REPO
|
|
17
10
|
|
|
18
11
|
|
|
19
12
|
def _parse_parent_owner_repo(repo_obj: Any) -> Optional[Tuple[str, str]]:
|
|
@@ -50,7 +43,7 @@ def _resolution_sources_sync(client: SyncAPIClient, owner: str, repo: str) -> Li
|
|
|
50
43
|
sources.append(pair)
|
|
51
44
|
|
|
52
45
|
add((owner, repo))
|
|
53
|
-
add((owner,
|
|
46
|
+
add((owner, GITCODE_TEMPLATE_REPO))
|
|
54
47
|
|
|
55
48
|
max_candidates = 64
|
|
56
49
|
index = 0
|
|
@@ -68,7 +61,7 @@ def _resolution_sources_sync(client: SyncAPIClient, owner: str, repo: str) -> Li
|
|
|
68
61
|
continue
|
|
69
62
|
po, pr = parsed
|
|
70
63
|
add((po, pr))
|
|
71
|
-
add((po,
|
|
64
|
+
add((po, GITCODE_TEMPLATE_REPO))
|
|
72
65
|
|
|
73
66
|
return sources
|
|
74
67
|
|
|
@@ -86,7 +79,7 @@ async def _resolution_sources_async(client: AsyncAPIClient, owner: str, repo: st
|
|
|
86
79
|
sources.append(pair)
|
|
87
80
|
|
|
88
81
|
add((owner, repo))
|
|
89
|
-
add((owner,
|
|
82
|
+
add((owner, GITCODE_TEMPLATE_REPO))
|
|
90
83
|
|
|
91
84
|
max_candidates = 64
|
|
92
85
|
index = 0
|
|
@@ -104,7 +97,7 @@ async def _resolution_sources_async(client: AsyncAPIClient, owner: str, repo: st
|
|
|
104
97
|
continue
|
|
105
98
|
po, pr = parsed
|
|
106
99
|
add((po, pr))
|
|
107
|
-
add((po,
|
|
100
|
+
add((po, GITCODE_TEMPLATE_REPO))
|
|
108
101
|
|
|
109
102
|
return sources
|
|
110
103
|
|
|
@@ -210,6 +203,8 @@ def list_gitcode_template_rows_sync(
|
|
|
210
203
|
acc: List[Tuple[str, str, str, str]] = []
|
|
211
204
|
try:
|
|
212
205
|
_walk_dot_gitcode_contents_sync(client, so, sr, ".gitcode", acc)
|
|
206
|
+
if sr != GITCODE_TEMPLATE_REPO:
|
|
207
|
+
_walk_dot_gitcode_contents_sync(client, so, sr, ".github", acc)
|
|
213
208
|
except GitCodeHTTPStatusError:
|
|
214
209
|
continue
|
|
215
210
|
rows = [(t_o, t_r, p, s) for t_o, t_r, p, s in acc if path_pattern.match(p)]
|
|
@@ -224,10 +219,13 @@ async def list_gitcode_template_rows_async(
|
|
|
224
219
|
repo: str,
|
|
225
220
|
path_pattern: Pattern[str],
|
|
226
221
|
) -> List[Tuple[str, str, str, str]]:
|
|
222
|
+
"""Return ``(template_owner, template_repo, path, sha)`` from the first resolution source with matches."""
|
|
227
223
|
for so, sr in await _resolution_sources_async(client, owner, repo):
|
|
228
224
|
acc: List[Tuple[str, str, str, str]] = []
|
|
229
225
|
try:
|
|
230
226
|
await _walk_dot_gitcode_contents_async(client, so, sr, ".gitcode", acc)
|
|
227
|
+
if sr != GITCODE_TEMPLATE_REPO:
|
|
228
|
+
await _walk_dot_gitcode_contents_async(client, so, sr, ".github", acc)
|
|
231
229
|
except GitCodeHTTPStatusError:
|
|
232
230
|
continue
|
|
233
231
|
rows = [(t_o, t_r, p, s) for t_o, t_r, p, s in acc if path_pattern.match(p)]
|
|
@@ -242,6 +240,8 @@ def get_gitcode_template_body_sync(
|
|
|
242
240
|
path_pattern: Pattern[str],
|
|
243
241
|
owner: str,
|
|
244
242
|
repo: str,
|
|
243
|
+
encoding: str = "utf-8",
|
|
244
|
+
**decoding_kwargs,
|
|
245
245
|
) -> str:
|
|
246
246
|
"""Fetch raw template text from the first resolution source that serves ``path``."""
|
|
247
247
|
if not path_pattern.match(path):
|
|
@@ -262,7 +262,7 @@ def get_gitcode_template_body_sync(
|
|
|
262
262
|
last_error = exc
|
|
263
263
|
continue
|
|
264
264
|
if isinstance(raw, bytes):
|
|
265
|
-
return raw.decode(
|
|
265
|
+
return raw.decode(encoding=encoding, **decoding_kwargs)
|
|
266
266
|
if isinstance(raw, str):
|
|
267
267
|
return raw
|
|
268
268
|
return str(raw)
|
|
@@ -281,7 +281,10 @@ async def get_gitcode_template_body_async(
|
|
|
281
281
|
path_pattern: Pattern[str],
|
|
282
282
|
owner: str,
|
|
283
283
|
repo: str,
|
|
284
|
+
encoding: str = "utf-8",
|
|
285
|
+
**decoding_kwargs,
|
|
284
286
|
) -> str:
|
|
287
|
+
"""Fetch raw template text from the first resolution source that serves ``path``."""
|
|
285
288
|
if not path_pattern.match(path):
|
|
286
289
|
raise GitCodeHTTPStatusError(
|
|
287
290
|
"Path does not match the expected GitCode template pattern for this resource.",
|
|
@@ -300,7 +303,7 @@ async def get_gitcode_template_body_async(
|
|
|
300
303
|
last_error = exc
|
|
301
304
|
continue
|
|
302
305
|
if isinstance(raw, bytes):
|
|
303
|
-
return raw.decode(
|
|
306
|
+
return raw.decode(encoding=encoding, **decoding_kwargs)
|
|
304
307
|
if isinstance(raw, str):
|
|
305
308
|
return raw
|
|
306
309
|
return str(raw)
|
|
@@ -909,37 +909,106 @@ class AsyncSearchResource(AsyncResource):
|
|
|
909
909
|
see ``docs/rest_api/search`` and the synchronous methods for field meanings.
|
|
910
910
|
"""
|
|
911
911
|
|
|
912
|
-
async def users(
|
|
912
|
+
async def users(
|
|
913
|
+
self,
|
|
914
|
+
*,
|
|
915
|
+
q: str,
|
|
916
|
+
page: Optional[int] = None,
|
|
917
|
+
per_page: Optional[int] = None,
|
|
918
|
+
sort: Optional[str] = None,
|
|
919
|
+
order: Optional[str] = None,
|
|
920
|
+
) -> List[SearchUser]:
|
|
913
921
|
"""Search users.
|
|
914
922
|
|
|
915
|
-
:param q: Search keywords
|
|
916
|
-
:param
|
|
917
|
-
|
|
923
|
+
:param q: Search keywords.
|
|
924
|
+
:param page: Page number.
|
|
925
|
+
:param per_page: Page size.
|
|
926
|
+
:param sort: Optional sort field such as ``joined_at``.
|
|
927
|
+
:param order: Sort order, usually ``asc`` or ``desc``.
|
|
918
928
|
:returns: Matching user search results.
|
|
919
929
|
"""
|
|
920
|
-
return await self._models(
|
|
930
|
+
return await self._models(
|
|
931
|
+
"GET",
|
|
932
|
+
self._client._path("search", "users"),
|
|
933
|
+
SearchUser,
|
|
934
|
+
params={"q": q, "page": page, "per_page": per_page, "sort": sort, "order": order},
|
|
935
|
+
)
|
|
921
936
|
|
|
922
|
-
async def issues(
|
|
937
|
+
async def issues(
|
|
938
|
+
self,
|
|
939
|
+
*,
|
|
940
|
+
q: str,
|
|
941
|
+
page: Optional[int] = None,
|
|
942
|
+
per_page: Optional[int] = None,
|
|
943
|
+
sort: Optional[str] = None,
|
|
944
|
+
order: Optional[str] = None,
|
|
945
|
+
repo: Optional[str] = None,
|
|
946
|
+
state: Optional[str] = None,
|
|
947
|
+
) -> List[SearchIssue]:
|
|
923
948
|
"""Search issues.
|
|
924
949
|
|
|
925
|
-
:param q: Search keywords
|
|
926
|
-
:param
|
|
927
|
-
|
|
950
|
+
:param q: Search keywords.
|
|
951
|
+
:param page: Page number.
|
|
952
|
+
:param per_page: Page size.
|
|
953
|
+
:param sort: Optional sort field.
|
|
954
|
+
:param order: Sort order, usually ``asc`` or ``desc``.
|
|
955
|
+
:param repo: Optional repository path filter.
|
|
956
|
+
:param state: Optional issue state filter.
|
|
928
957
|
:returns: Matching issue search results.
|
|
929
958
|
"""
|
|
930
|
-
return await self._models(
|
|
959
|
+
return await self._models(
|
|
960
|
+
"GET",
|
|
961
|
+
self._client._path("search", "issues"),
|
|
962
|
+
SearchIssue,
|
|
963
|
+
params={
|
|
964
|
+
"q": q,
|
|
965
|
+
"page": page,
|
|
966
|
+
"per_page": per_page,
|
|
967
|
+
"sort": sort,
|
|
968
|
+
"order": order,
|
|
969
|
+
"repo": repo,
|
|
970
|
+
"state": state,
|
|
971
|
+
},
|
|
972
|
+
)
|
|
931
973
|
|
|
932
|
-
async def repositories(
|
|
974
|
+
async def repositories(
|
|
975
|
+
self,
|
|
976
|
+
*,
|
|
977
|
+
q: str,
|
|
978
|
+
page: Optional[int] = None,
|
|
979
|
+
per_page: Optional[int] = None,
|
|
980
|
+
sort: Optional[str] = None,
|
|
981
|
+
order: Optional[str] = None,
|
|
982
|
+
owner: Optional[str] = None,
|
|
983
|
+
fork: Optional[str] = None,
|
|
984
|
+
language: Optional[str] = None,
|
|
985
|
+
) -> List[SearchRepository]:
|
|
933
986
|
"""Search repositories.
|
|
934
987
|
|
|
935
|
-
:param q: Search keywords
|
|
936
|
-
:param
|
|
937
|
-
|
|
938
|
-
|
|
988
|
+
:param q: Search keywords.
|
|
989
|
+
:param page: Page number.
|
|
990
|
+
:param per_page: Page size.
|
|
991
|
+
:param sort: Optional sort field such as ``stars_count``.
|
|
992
|
+
:param order: Sort order, usually ``asc`` or ``desc``.
|
|
993
|
+
:param owner: Optional owner path filter.
|
|
994
|
+
:param fork: Optional fork visibility filter.
|
|
995
|
+
:param language: Optional programming language filter.
|
|
939
996
|
:returns: Matching repository search results.
|
|
940
997
|
"""
|
|
941
998
|
return await self._models(
|
|
942
|
-
"GET",
|
|
999
|
+
"GET",
|
|
1000
|
+
self._client._path("search", "repositories"),
|
|
1001
|
+
SearchRepository,
|
|
1002
|
+
params={
|
|
1003
|
+
"q": q,
|
|
1004
|
+
"page": page,
|
|
1005
|
+
"per_page": per_page,
|
|
1006
|
+
"sort": sort,
|
|
1007
|
+
"order": order,
|
|
1008
|
+
"owner": owner,
|
|
1009
|
+
"fork": fork,
|
|
1010
|
+
"language": language,
|
|
1011
|
+
},
|
|
943
1012
|
)
|
|
944
1013
|
|
|
945
1014
|
|