Skip to content

Updated Examples #136

Description

@RMagician

Describe the bug
Hey, first of all thanks for the api wrapper. I'm trying to use it for v3 Reports, but not being able to. If you could provide some updated examples would be great. The example in the readme is for v2 and deprecated.

To Reproduce

from ad_api.api.reports import Reports

from config import AmazonAdAPI

my_credentials = AmazonAdAPI.get_credentials()



params = {
        "name":"",
        "startDate":"2023-04-01",
        "endDate":"2023-04-08",
        "configuration":{
            "adProduct":"SPONSORED_PRODUCTS",
            "groupBy":["campaign","adGroup"],
            "columns":["adGroupId","campaignId", "impressions", "clicks", "cost", "purchases1d", "purchases7d", "purchases14d", "purchases30d","date"],
            "reportTypeId":"spCampaigns",
            "format":"GZIP_JSON"
        }
    }

result=Reports(credentials=my_credentials).post_report(**params)

Expected behavior
I've tried a few different scenarios but keep getting stuck on different errors.

Desktop (please complete the following information):
Python 3.11.1
python-amazon-ad-api 0.4.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions