Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag voting #240

Open
alastair opened this issue Oct 31, 2018 · 1 comment
Open

Tag voting #240

alastair opened this issue Oct 31, 2018 · 1 comment
Milestone

Comments

@alastair
Copy link
Owner

We should add the ability to vote for tags as well as the currently behaviour of just replacing all tags. This means that users can add new tags without first having to retrieve all of their existing tags.

As per https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2#tags

Our tag functionality includes the ability to upvote and downvote tags. This terminology can be confusing. Whenever you tag something, you are in fact "upvoting" it (which will add 1 to the vote count for the tag). Downvoting is the inverse operation, and will subtract 1 from the tag's vote count. Tags that you downvote will be hidden from the UI for you (and if their total vote count drops to 0 or below, they'll be hidden for everyone). The "user-tag" elements can include a "vote" attribute that specifies what action you want to take:

<user-tag vote="upvote"><name>noise</name></user-tag>
<user-tag vote="downvote"><name>pop</name></user-tag>
<user-tag vote="withdraw"><name>rock</name></user-tag>

The "withdraw" vote will remove any upvote or downvote that you previously added (as if you had never voted).

If you do not supply any "vote" attributes in your request (as in the example above), then the list of tags you submit will be treated as upvotes and will completely replace all existing upvoted tags you have on that entity. (So, tags that are not included in the request will be withdrawn, if they were previously upvoted. Downvoted tags are left in place.) This is a legacy behavior that we maintain from before we had tag voting. Including any "vote" attribute in the request will cause it to only apply those votes that you specified.

@gorgobacka
Copy link

I already started to implement this and a PR is on the way.

gorgobacka added a commit to gorgobacka/python-musicbrainzngs that referenced this issue Oct 31, 2018
@alastair alastair added this to the 0.7 milestone Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants