gitcode_api.resources._shared

Shared resource base classes for the GitCode SDK.

Functions

get_gitcode_template_body_async(client, ...)

get_gitcode_template_body_sync(client, path, ...)

Fetch raw template text from the first resolution source that serves path.

list_gitcode_template_rows_async(client, ...)

list_gitcode_template_rows_sync(client, ...)

Return (template_owner, template_repo, path, sha) from the first resolution source with matches.

Classes

AsyncResource(client)

Base class for asynchronous resource groups.

SyncResource(client)

Base class for synchronous resource groups.

list_gitcode_template_rows_sync(client: SyncAPIClient, owner: str, repo: str, path_pattern: Pattern[str]) List[Tuple[str, str, str, str]]

Return (template_owner, template_repo, path, sha) from the first resolution source with matches.

get_gitcode_template_body_sync(client: SyncAPIClient, path: str, path_pattern: Pattern[str], owner: str, repo: str) str

Fetch raw template text from the first resolution source that serves path.

class SyncResource(client: SyncAPIClient)

Bases: BaseResource

Base class for synchronous resource groups.

Bind the resource to a synchronous API client.

class AsyncResource(client: AsyncAPIClient)

Bases: BaseResource

Base class for asynchronous resource groups.

Bind the resource to an asynchronous API client.