-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Restructured API endpoints for ohsomeNow stats #6021
Conversation
Hey @HelNershingThapa , this is the new response format for the user stats endpoint. I've added a comment to the result fields to indicate the corresponding name in the old osm-stats API. Please note that the new response does not contain the fields
For the overall and project level stats the response format looks like this:
|
0656dfc
to
c6a4bb0
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hey @HelNershingThapa
|
The Additionally, I'd like to inform you about the following to-do items related to this PR:
|
Involves the migration of all MissingMaps API endpoints to utilize the endpoints provided by ohsomeNow stats. The changes encompass four distinct sections, namely homepage stats, project-level stats, user-level stats, and TM level stats. Removed the definitions of specific API endpoints, such as `TM_HOMEPAGE_STATS_API_URL` and `TM_USER_STATS_API_URL`, from the environment configuration. A new approach was implemented by introducing a new base URL for ohsomeNow (`OHSOME_STATS_BASE_URL`). This new structure enables the specification of endpoints at a component level, as opposed to being bound to the environment configuration.
- Introduce a new component, `StatsTimestamp`, responsible for displaying timestamps with tooltips. This component accepts a `messageType` prop to determine whether to show a generic or project-specific message. The inconsistent icon usage has been resolved, now consistently using an info icon. - Reorganized the codebase by removing timestamp implementations from the User Contributions and Project Stats components. Instead, these components now utilize the newly introduced `StatsTimestamp` component for timestamp display. - Integrated the `StatsTimestamp` component into the Total Features section of the overall statistics page.
0c30aea
to
a5fa2cb
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hey @ramyaragupathy,
|
Involves the migration of all MissingMaps API endpoints to utilize the endpoints provided by ohsomeNow stats. The changes encompass four distinct sections: homepage stats, project-level stats, user-level stats, and TM-level stats.
Notably, certain data variables are currently absent, while others are seamlessly integrated:
Header: The variablechangeset_count
is missing, which is essential for displaying the user's progress toward the next mapping level.An unfamiliar key namedobject_edits
has been identified, but its purpose requires clarification.The choice betweenValues for added POIs and waterways are absent.building_count
orbuildings_added
, as well asroad_km_added
orroad_length
needs clarification.poi_count_add
andwaterway_km_add
are missing.Enhanced Timestamp Display
User Contributions
Manage > Stats > Total Features
Project
The environment configuration no longer retains explicit API endpoint definitions like
TM_HOMEPAGE_STATS_API_URL
andTM_USER_STATS_API_URL
. Instead, a more flexible approach utilizes a new base URL (OHSOME_STATS_BASE_URL
) andOHSOME_STATS_TOKEN
for token usage (for retrieving user stats) in conjunction with endpoints specified at the component level.