Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

Commit 616b898

Browse files
committed
get_favorite()
1 parent c42cb6c commit 616b898

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

vrcpy/aobjects.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ async def favorite(self):
105105
async def remove_favorite(self, id):
106106
resp = await self.client.api.call("/favorites/"+id, "DELETE")
107107

108+
async def get_favorite(self, id):
109+
resp = await self.client.api.call("/favorites/"+id)
110+
return Favorite(resp)
111+
108112
async def update_info(self, email=None, status=None,\
109113
statusDescription=None, bio=None, bioLinks=None):
110114

vrcpy/objects.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ def fetch_favorites(self, t):
207207
def remove_favorite(self, id):
208208
resp = self.client.api.call("/favorites/"+id, "DELETE")
209209

210+
def get_favorite(self, id):
211+
resp = self.client.api.call("/favorites/"+id)
212+
return Favorite(resp)
213+
210214
def favorite(self):
211215
raise AttributeError("'CurrentUser' object has no attribute 'favorite'")
212216

0 commit comments

Comments
 (0)