VisualAppeal / Matomo-PHP-API

PHP wrapper for the Matomo API.
MIT License
95 stars 33 forks source link

Fix bug: change _rangeEnd to today #13

Closed hackolein closed 9 years ago

hackolein commented 9 years ago

Change the _rangeEnd Date to today, because it can not be empty. It's the fallback, if there is no rangeEnd is given.

thelfensdrfer commented 9 years ago

This confirms better with the documentation of the paremter Leave this parameter empty to request all data from $rangeStart until now, but $this->_date = $rangeStart; was valid too. It only set the range to one day, the start day.

hackolein commented 9 years ago

Ok, but when I left the parameter blank, then I get the following error message back: { "result": "error", "message": "Das Datum '2014-12-10,' ist keine korrekte Zeitspanne. Es sollte das folgende Format haben: 'lastN', 'previousN', 'YYYY-MM-DD,YYYY-MM-DD'" }

With the API call: "... period=range&format=json&language=de& ... &date=2014-12-10,"

But, now it works :+1:

thelfensdrfer commented 9 years ago

Ok this is strange, the start range should be copied to the end range...but great that it works now!