VisualAppeal / Matomo-PHP-API

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

idSite shouldn't be a mandatory construct parameter #45

Closed lockland closed 5 years ago

lockland commented 5 years ago

I would like to know why idSite is a construct parameter.

I'm integrating a company system with matomo and I'll have many websites to interact with and add other programatically.

I saw that this package provide an addSite method, but I cannot use it before instantiate an object, and I cannot instantiate one before have a site on matomo, so it doesnt make sense to me.

Is there any other way to add a site or create a matomo object without known the idSite?

thelfensdrfer commented 5 years ago

You are right. For the addSite method the siteId is superfluous. I will change it in the next release.

lockland commented 5 years ago

Thank you for answer fast and solve the issue faster.