Skip to content

codingame_tools.client.service.services.clash_of_code_description

clash_of_code_description

Async ClashOfCodeDescription service endpoint.

CgClashOfCodeDescriptionServiceHelper

CgClashOfCodeDescriptionServiceHelper(service)

Bases: CgServiceHelper['CgClashOfCodeDescriptionService']

Helper methods for CgClashOfCodeDescriptionService. Currently empty.

Source code in codingame_tools/client/service/cg_service.py
124
125
def __init__(self, service: TService) -> None:
    self.service = service

CgClashOfCodeDescriptionService

CgClashOfCodeDescriptionService(client)

Bases: CgService

Async ClashOfCodeDescription service endpoint.

Source code in codingame_tools/client/service/services/clash_of_code_description.py
23
24
25
def __init__(self, client: CgClient) -> None:
    super().__init__(client, "ClashOfCodeDescription")
    self.helper = CgClashOfCodeDescriptionServiceHelper(self)

get_clash_description async

get_clash_description()

Get localized help/explainer content for Clash of Code.

Returns:

Raises:

  • CgAuthenticationError

    If the session is not authenticated and cannot implicitly login.

  • CgClientHttpError

    If a transport error occurs, if the response content could not be decoded at all, if the status code is not 2xx, or if the decoded content is not a dict.

Source code in codingame_tools/client/service/services/clash_of_code_description.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
async def get_clash_description(self) -> CgClashDescription:
    """Get localized help/explainer content for Clash of Code.

    Returns:
        A CgClashDescription object.

    Raises:
        CgAuthenticationError:
            If the session is not authenticated and cannot implicitly login.
        CgClientHttpError:
            If a transport error occurs, if the response content could not be decoded at all,
            if the status code is not 2xx, or if the decoded content is not a dict.
    """
    raw_description = await self.service_request_to_dict("getClashDescription")
    return CgClashDescription.from_dict(raw_description)