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 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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user