Module aiogithubapi.objects.repository.release
AIOGitHubAPI: Repository Release
https://developer.github.com/v3/repos/releases/
Expand source code
"""
AIOGitHubAPI: Repository Release
https://developer.github.com/v3/repos/releases/
"""
# pylint: disable=missing-docstring
from datetime import datetime
from ...objects.base import AIOGitHubAPIBase
from ...objects.repository.content import AIOGitHubAPIRepositoryContent
class AIOGitHubAPIRepositoryRelease(AIOGitHubAPIBase):
"""Repository Release GitHub API implementation."""
@property
def tag_name(self):
return self.attributes.get("tag_name")
@property
def name(self):
return self.attributes.get("name")
@property
def published_at(self):
return datetime.strptime(self.attributes.get("published_at"), "%Y-%m-%dT%H:%M:%SZ")
@property
def draft(self):
return self.attributes.get("draft")
@property
def prerelease(self):
return self.attributes.get("prerelease")
@property
def assets(self):
return [AIOGitHubAPIRepositoryContent(x) for x in self.attributes.get("assets", [])]
Classes
class AIOGitHubAPIRepositoryRelease (attributes)
-
Repository Release GitHub API implementation.
Initialize.
Expand source code
class AIOGitHubAPIRepositoryRelease(AIOGitHubAPIBase): """Repository Release GitHub API implementation.""" @property def tag_name(self): return self.attributes.get("tag_name") @property def name(self): return self.attributes.get("name") @property def published_at(self): return datetime.strptime(self.attributes.get("published_at"), "%Y-%m-%dT%H:%M:%SZ") @property def draft(self): return self.attributes.get("draft") @property def prerelease(self): return self.attributes.get("prerelease") @property def assets(self): return [AIOGitHubAPIRepositoryContent(x) for x in self.attributes.get("assets", [])]
Ancestors
Instance variables
var assets
-
Expand source code
@property def assets(self): return [AIOGitHubAPIRepositoryContent(x) for x in self.attributes.get("assets", [])]
var draft
-
Expand source code
@property def draft(self): return self.attributes.get("draft")
var name
-
Expand source code
@property def name(self): return self.attributes.get("name")
var prerelease
-
Expand source code
@property def prerelease(self): return self.attributes.get("prerelease")
var published_at
-
Expand source code
@property def published_at(self): return datetime.strptime(self.attributes.get("published_at"), "%Y-%m-%dT%H:%M:%SZ")
var tag_name
-
Expand source code
@property def tag_name(self): return self.attributes.get("tag_name")