Skip to content

codingame_tools.client.common.protocol.codingamer_puzzle_topic

codingamer_puzzle_topic

JSON-serializable dataclasses for the CodingamerPuzzleTopic service's findTopicsByCodingamerId and selectTopicsByCodingamerIdAndPuzzleId Codingame API methods.

CgPuzzleTopicCategory module-attribute

CgPuzzleTopicCategory = str

The difficulty category a puzzle topic belongs to, e.g. "FUNDAMENTALS", "INTERMEDIATE", "ADVANCED".

CgCodingamerPuzzleTopic dataclass

CgCodingamerPuzzleTopic(category, handle, label, puzzle_count, _last_progress_time=Alias('lastProgressTime'), extra_data=dict())

Bases: JSONWizardX

A codingamer's progress on a single puzzle topic (e.g. "Arrays", "BFS"), as returned by findTopicsByCodingamerId. Only topics the codingamer has made some progress on are returned (100 topics observed for a codingamer active since ~2018).

category instance-attribute

category

The topic's difficulty category; see CgPuzzleTopicCategory.

handle instance-attribute

handle

Opaque (but human-readable) slug for the topic, e.g. "2d-array", "bfs".

label instance-attribute

label

Display name for the topic, e.g. "2D array", "BFS".

puzzle_count instance-attribute

puzzle_count

Number of puzzles tagged with this topic that the codingamer has solved/attempted.

last_progress_time property writable

last_progress_time

See the field docstring for _last_progress_time. Always UTC.

CgCodingamerTopicNode dataclass

CgCodingamerTopicNode(id, handle, value, learned, extra_data=dict(), children=list(), category=None)

Bases: JSONWizardX

A single node in a puzzle's topic tree, personalized for a specific codingamer, as returned (in a bare JSON array) by selectTopicsByCodingamerIdAndPuzzleId. Similar to CgPuzzleTopicNode (last_activities.py, used by other puzzle-related endpoints), but adds id/learned for per-codingamer topic mastery tracking; category was not observed in the single example seen so far, so it's modeled as optional here (as it is on CgPuzzleTopicNode).

id instance-attribute

id

Numeric ID of the topic.

handle instance-attribute

handle

Opaque (but human-readable) slug for the topic, e.g. "constraint-propagation".

value instance-attribute

value

Display name for the topic, e.g. "Constraint Propagation".

learned instance-attribute

learned

Whether the codingamer has "learned" (mastered) this topic.

children class-attribute instance-attribute

children = field(default_factory=list)

Child topics nested under this one. Often empty.

category class-attribute instance-attribute

category = None

The topic's difficulty category; see CgPuzzleTopicCategory. Not observed in the single example seen so far.