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

Add new API methods UserCountry.getNumberOfDistinctContinents and UserCountry.getNumberOfDistinctRegions #10048

Open
lixinxiaobai opened this issue Apr 13, 2016 · 4 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.

Comments

@lixinxiaobai
Copy link

Why didn't UserCountry.getCountry, UserCountry.getContinent, UserCountry.getRegion statistics?
only UserCountry.getNumberOfDistinctCountries?
For example:
UserCountry.getNumberOfDistinctContinents,
UserCountry.getNumberOfDistinctgetRegions are not these API

@tsteur
Copy link
Member

tsteur commented Apr 14, 2016

There's probably no particular reason for it. Just that it wasn't needed so far.

I don't quite understand which API's you need exactly? Do I get it right you want UserCountry.getNumberOfDistinctContinents and UserCountry. getNumberOfDistinctRegions? You could probably always request all Continents or all regions with filter_limit=-1 and then count the number of entries in the result.

@lixinxiaobai
Copy link
Author

Right, I am get all continents or city, then calculates the number of items to obtain the total number of, but such speed is not good.

So I want to have a method like UserCountry.getNumberOfDistinctCountries can be obtained directly from the count

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels Apr 14, 2016
@tsteur
Copy link
Member

tsteur commented Apr 14, 2016

True this is surely not perfect. I will adjust the title of the issue.

I recently thought of actually deprecating the getNumberOfDistinctCountries method at some point but on the other side we could also add more such API methods also for other APIs.

When we work on the new archiver in #7470 we could actually even archive such metrics automatically for all reports, and eventually maybe even add such API methods automatically as well.

@tsteur tsteur changed the title why didn't UserCountry.getCountry, UserCountry.getContinent, UserCountry.getRegion statistics? Add new API methods UserCountry.getNumberOfDistinctContinents and UserCountry.getNumberOfDistinctRegions Apr 14, 2016
@mattab
Copy link
Member

mattab commented Jul 14, 2016

When we work on the new archiver in #7470 we could actually even archive such metrics automatically for all reports, and eventually maybe even add such API methods automatically as well.

+1

Such report metadata could be returned by the Metadata API reports yet without requiring to load the full processed report.

@mattab mattab added this to the Mid term milestone Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

3 participants