Skip to content

Commit

Permalink
Add after property to Meta class. Closes #1069.
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Nov 11, 2023
1 parent 2335f8a commit 7c45c7a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/falconpy/_result/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def query_time(self) -> Optional[float]:
"""Return the the contents of the query_time key."""
return self.get_property("query_time", None)

@property
def after(self) -> Optional[Union[int, str, float]]:
"""Return the the contents of the after key."""
return self.pagination.get("after", None)

@property
def offset(self) -> Optional[Union[int, str, float]]:
"""Return the the contents of the offset key."""
Expand Down
8 changes: 8 additions & 0 deletions src/falconpy/_result/_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,14 @@ def total(self) -> Optional[Union[int, str, float]]:
_returned = self.meta.total
return _returned

@property
def after(self) -> Optional[Union[int, str, float]]:
"""Return the record after from the underlying Meta object."""
_returned: Optional[Union[int, str, float]] = None
if self.meta:
_returned = self.meta.after
return _returned

@property
def offset(self) -> Optional[Union[int, str, float]]:
"""Return the record offset from the underlying Meta object."""
Expand Down

0 comments on commit 7c45c7a

Please sign in to comment.