Ponytech / appstoreconnectapi

Python wrapper around Apple App Store Api

Home Page:https://ponytech.net/projects/app-store-connect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

api.download_sales_and_trends_reports() sends error when specifying reportType

foundmason opened this issue · comments

When making a 'api.download_sales_and_trends_reports' call with reportType set to 'SUBSCRIPTION'. apple store connect replies with 'APIError: Please include the version parameter. The latest version for this report is 1_2.'

Thanks for reporting this issue!
I'll have a look and fix it as soon as possible.

@foundmason I had a look at this issue.

As an immediate workaround you can manually set this required version parameter in your call:

api.download_sales_and_trends_reports( filters={
'vendorNumber': '123456789', 
'reportDate': '2020-01-01', 
'reportType': 'SUBSCRIPTION', 
'version': '1_2'
}, save_to='report.csv')

I'll try to automatically add it in a future release though.

Thanks. It worked. I wonder if calling different versions will be useful in the future... for now it seems to just break. I will eagerly await the future release :).

Cheers~

Fixed by b73d431

@ppawlak any chance you will update these changes on pypi anytime soon?

@GClunies I am planning to release a new version when I'll fix #20 (and maybe #21 as well). I hope to do this soon now, I was on vacation in July.

@ppawlak any chance you will update these changes on pypi anytime soon?

@GClunies
I just did, it is in version 0.8.1
Sorry for the long delay.