Module aiogithubapi.models.projects

GitHub projects model.

Expand source code
"""GitHub projects model."""
from __future__ import annotations

from typing import Any, Dict

from .base import GitHubDataModelBase
from .user import GitHubBaseUserModel


class GitHubProjectModel(GitHubDataModelBase):
    """GitHub project model."""

    owner_url: str | None = None
    url: str | None = None
    html_url: str | None = None
    columns_url: str | None = None
    id: int | None = None
    node_id: str | None = None
    name: str | None = None
    body: str | None = None
    number: int | None = None
    state: str | None = None
    creator: GitHubBaseUserModel | None = None
    created_at: str | None = None
    updated_at: str | None = None

    def _generate_creator(self, data: Dict[str, Any] | None) -> GitHubBaseUserModel:
        """Generate GitHub user creator model."""
        return GitHubBaseUserModel(data) if data else None

Classes

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

GitHub project model.

Init.

Expand source code
class GitHubProjectModel(GitHubDataModelBase):
    """GitHub project model."""

    owner_url: str | None = None
    url: str | None = None
    html_url: str | None = None
    columns_url: str | None = None
    id: int | None = None
    node_id: str | None = None
    name: str | None = None
    body: str | None = None
    number: int | None = None
    state: str | None = None
    creator: GitHubBaseUserModel | None = None
    created_at: str | None = None
    updated_at: str | None = None

    def _generate_creator(self, data: Dict[str, Any] | None) -> GitHubBaseUserModel:
        """Generate GitHub user creator model."""
        return GitHubBaseUserModel(data) if data else None

Ancestors

Class variables

var body : str | None
var columns_url : str | None
var created_at : str | None
var creator : GitHubBaseUserModel | None
var html_url : str | None
var id : int | None
var name : str | None
var node_id : str | None
var number : int | None
var owner_url : str | None
var state : str | None
var updated_at : str | None
var url : str | None

Inherited members