ashim888 / awis

A python script to query Amazon's Alexa Web Information Service (AWIS).
GNU General Public License v3.0
37 stars 18 forks source link

TrafficHistory issue with adding in parameters #17

Open ElliotP123 opened 6 years ago

ElliotP123 commented 6 years ago

Evening,

I'm trying to use the traffic history response group but I'm unable to add in the range and start parameters successfully. When I just run the query it returns successfully with the default values, I've tried a few combinations but I can't seem to get it to come together.

I'm also struggling to parse the response, I am receiving a successful response but I follow the example of URLInfo at the top of the README doc I encounter some issues.

fyzbt commented 5 years ago

The example from the README doesn't help at all, it's true. I had the same error. If you look at the source code though, you can see that the parameters can be set manually if you specify them directly the following way:

obj = CallAwis(ACCESS, SECRET) obj.traffichistory(URL, myrange=RANGE, start=START_DATE)

START_DATE must be in YYYMMDD format as stated in official AWIS docs.