Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit LocationProvider API and make it public #7240

Open
tsteur opened this issue Feb 18, 2015 · 3 comments
Open

Revisit LocationProvider API and make it public #7240

tsteur opened this issue Feb 18, 2015 · 3 comments
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@tsteur
Copy link
Member

tsteur commented Feb 18, 2015

It is possible to write a custom LocationProvider instead of eg GeoIP, ServerBased, Pecl, ... provider. Piwik will then use this LocationProvider to detect the location of the user. On developer.piwik.org it is mentioned that this is possible but only in a few lines.

At some point we should revisit this API as it is not really officially supported to do that (missing @api and therefore not public API). We should make the API simple in case it is not yet the case. For example why is there isAvailable() and isWorking(), is it really needed? Instead of getInfo() returning an array we could have getId(), getDescription(), getOrder(), getTitle(). It otherwise doesn't look to bad and seems to be not a lot of work and we maybe do not even have to break anything.

We also need to make sure it is not needed to do anything in core when adding a new location provider. Afterwards we'll make the API public and write a guide + blog post for it.

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Feb 18, 2015
@tsteur tsteur added this to the Mid term milestone Feb 18, 2015
@tsteur
Copy link
Member Author

tsteur commented Feb 18, 2015

Maybe it would be worth doing this before Piwik 3.0? Moving from Mid term to Piwik 3.0

@tsteur tsteur modified the milestones: Piwik 3.0.0, Mid term Feb 18, 2015
@mattab mattab modified the milestones: Mid term, Piwik 3.0.0, Long term Feb 18, 2015
@mattab
Copy link
Member

mattab commented Feb 18, 2015

(for now we prefer to remove it from the documentation as this is not so important, GeoIP working well so far, there are more important aspects of the platform)

@diosmosis
Copy link
Member

Just fyi: isAvailable is for whether the necessary software is installed. isWorking is for whether geolocation doesn't result in error. I'm not sure whether they're both necessary. Would have to look at the code I guess

@mattab mattab modified the milestones: Long term, Mid term Dec 23, 2015
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants