Skip to content

Commit

Permalink
chore: Clipの引数を変更
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Dec 5, 2023
1 parent 8d6358c commit 7307b8a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions mipac/models/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@


class Clip(AbstractModel):
def __init__(self, clip_data: IClip, *, client: ClientManager) -> None:
self.__clip: IClip = clip_data
def __init__(self, raw_clip: IClip, *, client: ClientManager) -> None:
self.__clip: IClip = raw_clip
self.__client: ClientManager = client

@property
Expand Down Expand Up @@ -56,16 +56,17 @@ def is_public(self) -> bool:
"""Whether the clip is public"""
return self.__clip["is_public"]

@property
def is_favorited(self) -> bool:
"""Whether the clip is favorited"""
return self.__clip["is_favorited"]

@property
def favorited_count(self) -> int:
"""The number of times the clip has been favorited"""
return self.__clip["favorited_count"]


@property
def is_favorited(self) -> bool:
"""Whether the clip is favorited"""
return self.__clip["is_favorited"]

@property
def api(self) -> ClientClipManager:
return self.__client.clip._get_client_clip_instance(clip_id=self.id)

0 comments on commit 7307b8a

Please sign in to comment.