Sam-Wisdoms / mood-flix

A website where users can search for books and movies based on their mood amd interest.
MIT License
0 stars 1 forks source link

Defining category with mood #1

Closed sebecjeanluc closed 9 months ago

sebecjeanluc commented 10 months ago

A team needs to decide how to hold the data

{ angry: ["romance", "action", "sci-fi"], sad: ['romace', 'comedy', ''] }

{ category: ["romance", "action", "horro","sci-fi"] }

cemileblks commented 10 months ago

For movies it seems it'll be more ideal to create an object with feelings and convert them to movie genres:

let moodArray = ["Happy", "Sad", "Excited", "Nostalgic", "Romantic", "Weird"]; // user can pick 

let moodToGenre = {
    "Happy": 35, // Comedy 

    "Sad": 18, // Drama

    "Excited": 28, // Action

    "Nostalgic": 10751, // Family

    "Romantic": 10749, // Romance

    "Weird": 878, // Science Fiction
};
sebecjeanluc commented 10 months ago

What are those numbers??

cemileblks commented 10 months ago

The numbers are from the API, the API link provided in our course for movies would not allow genre as a parameter, so we'd have to write too much code to get to that. Instead I searched for another API which enabled that. However with this one every genre was number coded which was available on the documentation. So I thought for the movies section this could be the array to convert. But we probably have to use a different method for books depending on the API we get.

sebecjeanluc commented 9 months ago

everything is good