I am trying to access a report called Sponsored products using Amazon AD API in python.
The code is as below.
data = {
"name":"",
"startDate":"2023-08-01",
"endDate":"2023-08-20",
"configuration":{
"adProduct":"SPONSORED_PRODUCTS",
"groupBy":["campaign","adGroup"],
"columns":["adGroupId","campaignId", "impressions", "clicks", "cost", "purchases1d", "purchases7d", "purchases14d", "purchases30d","date"],
"reportTypeId":"spCampaigns",
"timeUnit":"DAILY",
"format":"GZIP_JSON"
}
}
result = Reports.post_report(body = data)
However am getting an error as below,
Traceback (most recent call last):
File "/Users/***/Documents/codeBase/amazon-selling-central-integration/amz_ad_api/test-python-ad-report.py", line 38, in <module>
result = Reports.post_report(body = data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ad_api/base/helpers.py", line 21, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Reports.post_report() missing 1 required positional argument: 'self'
I am not sure what to be is passed in the Self. The example document also doesn't list something like that. It would be great to have some help