@@ -46,6 +46,23 @@ class AppReview:
46
46
class AppStoreEntry :
47
47
"""
48
48
Represents an app in the app store.
49
+
50
+ :param app_id:
51
+ ID of the app in the App Store. It can be found in the last path
52
+ segment of the app's App Store URL (remove the "id" prefix).
53
+
54
+ :param country:
55
+ Two-letter ISO code of the country where the app should be looked up.
56
+ Both lowercase ("de") and uppercase ("FI") codes are accepted. The
57
+ :meth:`reviews` method will only return reviews from users of that
58
+ country.
59
+
60
+ :param session:
61
+ The :class:`AppStoreSession` to use for communicating with the App
62
+ Store. If not specified, a new session is created internally. Use
63
+ this option to share the same session between entries to increase
64
+ efficiency (by using a shared HTTP connection pool) or to pass a
65
+ session with custom configuration parameters.
49
66
"""
50
67
51
68
def __init__ (
@@ -64,13 +81,24 @@ def __init__(
64
81
65
82
def reviews (self , limit : int = 0 ) -> Iterator [AppReview ]:
66
83
"""
67
- Fetch app reviews from the App Store and return them as an iterator .
84
+ Return an iterator that fetches app reviews from the App Store.
68
85
69
86
As the list of reviews is paginated, iterating over all reviews
70
87
triggers an additional HTTP request to the App Store's backend whenever
71
88
a new page needs to be fetched. For this reason, it is possible that
72
89
the iterator raises an error even after some reviews were already
73
90
returned.
91
+
92
+ Note that only reviews from the App Store entry's country are returned.
93
+ Also, the App Store's API only returns a subset of all reviews ever
94
+ given to the app, so it is normal that the numer of retrieved reviews
95
+ does not match the review count on the App Store page.
96
+
97
+ :param limit:
98
+ The maximum number of reviews to return.
99
+
100
+ :return:
101
+ An iterator that lazily fetches the app's reviews.
74
102
"""
75
103
path = f"/v1/catalog/{ self .country } /apps/{ self .app_id } /reviews"
76
104
0 commit comments