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

Extend 'famous_for' Property to have categories and add/adjust methods #43

Open
sthiepaan opened this issue Oct 3, 2020 · 2 comments
Open

Comments

@sthiepaan
Copy link
Collaborator

As mentioned in #32 we decided to extend this package with:

  • Categories for famous_for Property (thanks @jav7zaid for an idea!)
  • All countries should contain all categories for that property (even if they don't have a value)
  • Initial categories:
    • building
    • food
    • sport
  • Each category is an string[] (array of strings)
  • If category has no values it should be as as empty array
  • For the project needs all properties (and values) have to be lowercase.

After refactoring, each Country {Object} should contain:

{
  "country": "poland",
  "capital": "warsaw",
  "currency": "zloty",
  "native_language": ["polish"],
  "phone_code": "+48",
  "flag": "https://flagpedia.net/data/flags/h80/pl.png",
  "drive_direction": "right",
  // REFACTORED DATA
  "famous_for": {
    "building": ["palace of culture and science", "wawel"],
    "food": ["pierogi", "potatoes"],
    "sport": ["ski jumping", "volleyball"],
    // ...
  }
}

After updating/adding data, then we need to refacator getCountriesByFamousFor(famousThing) Method to have two parameters ➡️ getCountriesByFamousFor(type, value) (e.g.: getCountriesByFamousFor("sport", "football")).

@jav7zaid
Copy link
Contributor

jav7zaid commented Oct 3, 2020

@sthiepaan are you working on this?

@sthiepaan
Copy link
Collaborator Author

No, just create a separate issues, so we do not flood a single thread. You can grab it!

@bhatvikrant if all is clear and fine to you, could you assign @jav7zaid? 😉

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

No branches or pull requests

2 participants