Skip to content

Create method to get available property names from API #44

Open
@sthiepaan

Description

@sthiepaan

As mentioned in #32 we could extend this package with:

  • Method that allow API consumers get the names of all properties (so they can build categories tree)
  • All countries should contain all categories for that property (even if they don't have a value)

After calling that method what we could receive is:

[ "country", "capital", "currency", "native_language", "famous_for", "phone_code", "flag", "drive_direction"]

Unfortunately, not all of those properties are "useful" for that.

My first idea was to simply grab first item from data and extract its all property names. But I am not 100% sure if this is a clean and proper way to do. Maybe instead we should just define it separately and keep in mind to maintain together with changes to the data model 🤔

Feel free to have an input how can we achieve this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions