EventHopper / EHServerSide

Server-Side functionality including REST API, hosting scripts & client-server modules
0 stars 0 forks source link

Event Identifier to EH Category Mapper Function #37

Open kylermintah opened 4 years ago

kylermintah commented 4 years ago

Event Identifier to EH Category Mapper Function (#37)

Internal Module 🌟

_

Internal Modules are comprehensive engineering tasks or tasks with potentially large implications either in our backend or for client applications. Responsibility for the efficacy of an internal module lies on our own engineers

_

Background:

Some vendor APIs (such as TicketLeap) do not have categories for events. They usually do, however, have hashtags or other event category fields. The purpose of this function is to map external event category-identifying field entries to one of our internal category tags.

e.g. an external vendor API has the following event category field: hastags : ['music', 'rock', 'dance', 'funk']

EventHopper will have X number of category types (exact number TBD) and we need to convert instances of identifiers into one of our X category types.

Specification:

Given a single category name or a list of tags provided by the external vendor API, this function should return one of our X event category types along with an array of type String containing the original identifier(s) to be added as EH event tags for indexing purposes.

Unit Testing:

Input Format: Array<String> Output Format: Array<String, Array<String>>

  1. Concert Category: IN: ['music', 'rock', 'dance', 'funk', 'concert'] OUT: ['concert', ['music', 'rock', 'dance', 'funk', 'concert']]