From 82e84e03c08affc5fb18453cf0239f657ab1bc73 Mon Sep 17 00:00:00 2001 From: Patrice Date: Sat, 12 Dec 2020 09:13:46 +0100 Subject: [PATCH] Implement resource slicing converting the iterator into a list --- appstoreconnect/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appstoreconnect/api.py b/appstoreconnect/api.py index 34f0917..3f09c1f 100644 --- a/appstoreconnect/api.py +++ b/appstoreconnect/api.py @@ -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