Skip to content

Commit

Permalink
Added changes to add limit as parameter in iterate
Browse files Browse the repository at this point in the history
Signed-off-by: Omkar Mestry <omkar.mestry@here.com>
  • Loading branch information
omanges authored and sackh committed Aug 21, 2020
1 parent 584a27e commit cc6efaa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xyzspaces/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,15 @@ def search(
for f in features["features"]:
yield f

def iter_feature(self) -> Generator[Feature, None, None]:
def iter_feature(self, limit: int = 100) -> Generator[Feature, None, None]:
"""
Iterate over features in this space object.
:param limit: A max. number of features to return in the result.
:yields: A Feature object.
"""
for feature in self.api.get_space_iterate(
space_id=self._info["id"], limit=100
space_id=self._info["id"], limit=limit
):
yield feature

Expand Down

0 comments on commit cc6efaa

Please sign in to comment.