Skip to content

Commit

Permalink
Implement resource slicing converting the iterator into a list
Browse files Browse the repository at this point in the history
  • Loading branch information
ppawlak committed Dec 17, 2020
1 parent e79ce48 commit 82e84e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions appstoreconnect/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ def __init__(self, api, url):
self.total_length = None
self.payload = None

def __getitem__(self, item):
items = list(self)
return items[item]

def __iter__(self):
return self

Expand Down

0 comments on commit 82e84e0

Please sign in to comment.