simonseo / nyuad-spammer

Subscribe to instant notifications from Student Portal. Don't miss Marvel movie tickets again!
13 stars 5 forks source link

Subscription categories for users #21

Closed anchor14 closed 6 years ago

anchor14 commented 6 years ago

There are two columns in the csv file we get from scraping the Student Portal. The first is category_name and the second are topic. We want to decide which one we should give as options to the user to subscribe to.

category_name are things like [News & Information, Learning & Development, Job Opportunities, Internships & Volunteering, etc] topic are things like [Academic Affairs, Academics, Campus Life, Community Outreach, etc]

For now, we are moving on with topics as we thought it is closer to the original idea we had. However, we're open to discussions about this.

simonseo commented 6 years ago

@khalidhosani @arantzardzm Things we need in the flask app:

  1. @app.route("/addUser", method=["POST"]) - it should take userid.
  2. @app.route("/addUserSubscription", method=["POST"]) - we want to send data that looks like (note that category names are lowercase and no spaces. the flask server should map these names to the category ids and save it in the userdbs)
    {
    "userid" : 71923874827,
    "categoryNames": "athletics,studentlife"
    }
  3. the user DB should also save a timestamp for the last time that they were notified
ghost commented 6 years ago

@app.route("/addUser/\") would be much easier to implement and straightforward