data-skeptic / dataskeptic.com

Source code for dataskeptic.com
https://dataskeptic.com
14 stars 5 forks source link

Tagging Project #606

Open kylepolich opened 6 years ago

kylepolich commented 6 years ago

We now have the idea of a "Drip User". API endpoints coming.

Drip Users need to have Tags applied. The tags will be decided by an Admin user. The admin user needs a UI like this:

image

As they type, it should auto-suggest from the previously created tags. After they add the tag, it should transform from text to the tag element. It can have an "X" to delete, but once complete, it is immutable.

QUESTION: How do you prefer the API be set up? I see two options:

1) Send the drip_user_id and tags_list. The API first removes all previous tags, and then writes all the new tags. In this way, you are always sending the complete master list.

2) You send individual changes (add one, delete one).

Which do you prefer?

kylepolich commented 6 years ago

Put in Admin under the "Email" menu called "Tag Users"

kylepolich commented 6 years ago

GET drip/tag/list

POST drip/tag/add {name, description}

GET drip/user/tag/list'?email=kyle@dataskeptic.com

POST drip/user/tag/add {tag_id, email}

kylepolich commented 6 years ago

Admin Component:

Admin user has a search box in which they can type on email address

GET drip/user/tag/list?email=kyle@dataskeptic.com

^ returns all tags for a given email. The Admin user add and delete tags. Tags all have a tag_id. Admin user can create a new tag with drip/tag/add. Once added, they can then put it in the list. If they do, use drip/user/tag/add

hlib-lozhkovyi commented 6 years ago

The clearest way is to send a full list of tags

QUESTION: How do you prefer the API be set up? I see two options:

Send the drip_user_id and tags_list. The API first removes all previous tags, and then writes all the new tags. In this way, you are always sending the complete master list.

kylepolich commented 6 years ago

@gliblozhkovyi Ok, I have added it. You can POST to drip/user/tag/list with a dictionary of email and tags_list. The tags_list is an array of integers.