Skip to content

Conversation

@ashleyd480
Copy link

Hi Jinwook- my friend!
I recently came across your awesome library while designing a Google Map calculator (repo) to help volunteers devise contribution plans to reach their goals based on their current contribution data. Huge fan of your work and thank your for all the hard work you've put into this! <3

I was able to use your google-local-guides-api "library" to initially get my program up and running locally.

Based on my experience of using it and from being a Local Guide volunteer myself, I noticed and made a few suggested changes that I'm sharing here for your approval/discussion in this Merge Request. :)


1. Removal of Published Lists:
The handling of published lists has been removed as Google Maps no longer awards points or tracks contributions toward the category of published lists.

2. Addition of New Contribution Categories:
New contribution categories have been added to better reflect the current added categories that Google Local Guides can contribute to like captions This ensures that users can retrieve the most up-to-date information regarding their contributions.

3. Renaming of "Questions" to "Answers":
I updated where you termed a category as "questions" to "answers" instead. This is to accurately represent the data being collected, as This change improves clarity and aligns with how this category is where users answer multiple choice questions provided by Google.

4. Number Parsing Helper Function:
A new static method, parseNumber, has been introduced to facilitate the parsing of numeric values from strings. This method removes commas and converts the cleaned string into an integer, ensuring that numeric data is handled correctly.
[Without this added, I saw instances where the first digit of a number would be cut off if there were multiple digits and commas present.]

5. Handling Singular and Plural Forms:
The regex patterns have been updated to include a star (*) after the letter s in each of the contribution types (e.g., "photos", "videos"). This adjustment allows the regex to match both singular and plural forms. [Without this added, if there was only a single contribution in any of those categories, the regex would be unable to retrieve anything since with singular 1 contribution, there is no s at the end, i.e "1 photo".]

This changes were validated through console logging of the responseBody and testing the regex patterns on regex101.com. This step ensured that the regex patterns are functioning as intended and accurately capturing the required data.

Lastly:
How about we add a note to the readme to clarify that the regex is limited to the English version of Google Maps? The regex code currently relies on English words for matching. This is important for users to understand the context and limitations of the data extraction process. :)

Let me know if any questions or comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant