Skip to content

Commit

Permalink
feat: add get links shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
Olegt0rr committed Oct 30, 2023
1 parent 402488a commit f5da42f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion yatracker/types/full_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

__all__ = ["FullIssue"]


from datetime import datetime
from typing import TYPE_CHECKING

from .base import Base, field
from .comment import Comment
Expand All @@ -16,6 +16,9 @@
from .transitions import Transitions
from .user import User

if TYPE_CHECKING:
from .issue_link import IssueLink


class FullIssue(Base, kw_only=True):
url: str = field(name="self")
Expand Down Expand Up @@ -72,3 +75,7 @@ async def get_comments(self) -> list[Comment]:
async def post_comment(self, text: str, **kwargs) -> Comment:
"""Post comment for self."""
return await self._tracker.post_comment(self.id, text=text, **kwargs)

async def get_links(self) -> list[IssueLink]:
"""Get issue links."""
return await self._tracker.get_issue_links(self.id)

0 comments on commit f5da42f

Please sign in to comment.