Module aiogithubapi.models.views
GitHub views data class.
Expand source code
"""GitHub views data class."""
from __future__ import annotations
from typing import Any, Dict
from .base import GitHubDataModelBase
class _View(GitHubDataModelBase):
"""GitHub view data."""
timestamp: str | None = None
count: int | None = None
uniques: int | None = None
class GitHubViewsModel(GitHubDataModelBase):
"""GitHub views data class."""
count: int | None = None
uniques: int | None = None
views: list[_View] | None = None
def _generate_views(self, data: list[Dict[str, Any]]) -> list[_View]:
"""Generate views from list of dicts."""
return [_View(view) for view in data or []]
Classes
class GitHubViewsModel (data: Dict[str, Any])
-
GitHub views data class.
Init.
Expand source code
class GitHubViewsModel(GitHubDataModelBase): """GitHub views data class.""" count: int | None = None uniques: int | None = None views: list[_View] | None = None def _generate_views(self, data: list[Dict[str, Any]]) -> list[_View]: """Generate views from list of dicts.""" return [_View(view) for view in data or []]
Ancestors
Class variables
var count : int | None
var uniques : int | None
var views : list[_View] | None
Inherited members