Module aiogithubapi.models.reaction

GitHub reaction data class.

Expand source code
"""GitHub reaction data class."""
from __future__ import annotations

from .base import GitHubDataModelBase


class GitHubReactionModel(GitHubDataModelBase):
    """GitHub reaction data class."""

    _log_missing: bool = False

    url: str | None = None
    total_count: int | None = None
    thumbs_up: int | None = None
    thumbs_down: int | None = None
    laugh: int | None = None
    hooray: int | None = None
    confused: int | None = None
    heart: int | None = None
    rocket: int | None = None
    eyes: int | None = None

    def __post_init__(self):
        """Initialize attributes."""
        self.thumbs_up = self._raw_data.get("+1", 0)
        self.thumbs_down = self._raw_data.get("-1", 0)

Classes

class GitHubReactionModel (data: Dict[str, Any])

GitHub reaction data class.

Init.

Expand source code
class GitHubReactionModel(GitHubDataModelBase):
    """GitHub reaction data class."""

    _log_missing: bool = False

    url: str | None = None
    total_count: int | None = None
    thumbs_up: int | None = None
    thumbs_down: int | None = None
    laugh: int | None = None
    hooray: int | None = None
    confused: int | None = None
    heart: int | None = None
    rocket: int | None = None
    eyes: int | None = None

    def __post_init__(self):
        """Initialize attributes."""
        self.thumbs_up = self._raw_data.get("+1", 0)
        self.thumbs_down = self._raw_data.get("-1", 0)

Ancestors

Class variables

var confused : int | None
var eyes : int | None
var heart : int | None
var hooray : int | None
var laugh : int | None
var rocket : int | None
var thumbs_down : int | None
var thumbs_up : int | None
var total_count : int | None
var url : str | None

Inherited members