gitcode_api.resources._shared

Shared resource base classes for the GitCode SDK.

Functions

get_gitcode_template_body_async(client, ...)

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

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, ...)

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

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.

async list_gitcode_template_rows_async(client: AsyncAPIClient, 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, encoding: str = 'utf-8', **decoding_kwargs) str

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

async get_gitcode_template_body_async(client: AsyncAPIClient, path: str, path_pattern: Pattern[str], owner: str, repo: str, encoding: str = 'utf-8', **decoding_kwargs) 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.