Skip to content

Commit bdcf3ed

Browse files
authored
Merge pull request #92 from bottydim/patch-3
Update examples with listening stats
2 parents 21dd1d1 + aebbe87 commit bdcf3ed

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/source/misc/examples.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,17 @@ Print number of books for every marketplace::
2020
print(f"Country: {client.marketplace.upper()} | Number of books: {len(asins)}")
2121
print(34* "-")
2222

23+
Get listening statistics aggragated month-over-month from 2021-03 to 2021-06::
24+
25+
import audible
26+
27+
auth = audible.Authenticator.from_file(filename)
28+
client = audible.Client(auth)
29+
with audible.Client(auth=auth) as client:
30+
stats = client.get(
31+
"1.0/stats/aggregates",
32+
monthly_listening_interval_duration="3", #number of months to aggragate for
33+
monthly_listening_interval_start_date="2021-03", #start month for aggragation
34+
store="Audible")
35+
36+

0 commit comments

Comments
 (0)