Module aiogithubapi.models.events
GitHub Activity event models
Expand source code
"""GitHub Activity event models"""
from __future__ import annotations
from typing import Any, Dict
from .base import GitHubDataModelBase
class _Actor(GitHubDataModelBase):
"""Internal entry."""
id: str | None = None
login: str | None = None
display_login: str | None = None
gravatar_id: str | None = None
url: str | None = None
avatar_url: str | None = None
class _Repo(GitHubDataModelBase):
"""Internal entry."""
id: str | None = None
name: str | None = None
url: str | None = None
class GitHubEventModel(GitHubDataModelBase):
"""
GitHub base event data class.
The type is PascalCase
https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types
"""
id: str | None = None
type: str | None = None
actor: _Actor | None = None
org: _Actor | None = None
repo: _Repo | None = None
payload: Dict[str, Any] | None = None
public: bool | None = None
created_at: str | None = None
def _generate_actor(self, data: Dict[str, Any] | None) -> _Actor:
"""Generate actor data."""
return _Actor(data) if data else None
def _generate_repo(self, data: Dict[str, Any] | None) -> _Repo:
"""Generate repo data."""
return _Repo(data) if data else None
Classes
class GitHubEventModel (data: Dict[str, Any])
-
GitHub base event data class.
The type is PascalCase
https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types
Init.
Expand source code
class GitHubEventModel(GitHubDataModelBase): """ GitHub base event data class. The type is PascalCase https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types """ id: str | None = None type: str | None = None actor: _Actor | None = None org: _Actor | None = None repo: _Repo | None = None payload: Dict[str, Any] | None = None public: bool | None = None created_at: str | None = None def _generate_actor(self, data: Dict[str, Any] | None) -> _Actor: """Generate actor data.""" return _Actor(data) if data else None def _generate_repo(self, data: Dict[str, Any] | None) -> _Repo: """Generate repo data.""" return _Repo(data) if data else None
Ancestors
Class variables
var actor : _Actor | None
var created_at : str | None
var id : str | None
var org : _Actor | None
var payload : Dict[str, Any] | None
var public : bool | None
var repo : _Repo | None
var type : str | None
Inherited members