Add function to get a submission
I shouldn't have to use the Submission class to do anything outside of the library.
This commit is contained in:
parent
c72ff23a4a
commit
a70f181673
@ -521,3 +521,11 @@ class FAAPI:
|
|||||||
:return: User that this instance is logged in as.
|
:return: User that this instance is logged in as.
|
||||||
"""
|
"""
|
||||||
return self.get_user(self.username) if self.logged_in else None
|
return self.get_user(self.username) if self.logged_in else None
|
||||||
|
|
||||||
|
def get_submission(self, id: int) -> Submission:
|
||||||
|
"""
|
||||||
|
Gets a submission by its numeric ID.
|
||||||
|
:param id: Submission ID
|
||||||
|
:return: Submission
|
||||||
|
"""
|
||||||
|
return Submission.new_or_cached(self, id)
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='FAAPI',
|
name='FAAPI',
|
||||||
version='0.3.1',
|
version='0.4.0',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
url='https://tem.party/gitea/tom/FAAPI',
|
url='https://tem.party/gitea/tom/FAAPI',
|
||||||
license='WTFPL',
|
license='WTFPL',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user