Conversation
LouisTrezzini
left a comment
There was a problem hiding this comment.
Looks good to me, this is actually the function I needed on Friday
| def delete_tags(self, options: StreamOptions = None): | ||
| """ | ||
| *** WARNING *** Non-reversible operation | ||
| Given a TagBas Streamable, remove tags corresponding to this tag stream, whichever user saved it, for |
There was a problem hiding this comment.
Ok I corrected it
| a_ids = [a["id"] for a in self.stream_contents(options)] | ||
| tag_id = self._get_id() | ||
| while len(a_ids) > 0: | ||
| batch_size = 50 # limitation due to the url length: articles are "de-tagged" by batch of 10. |
There was a problem hiding this comment.
Ok I wrote 50 for batch_size in the comment as well.
| def delete_tags(self, options: StreamOptions = None): | ||
| """ | ||
| *** WARNING *** Non-reversible operation | ||
| Given a TagBas Streamable, remove tags corresponding to this tag stream, whichever user saved it, for |
There was a problem hiding this comment.
"whichever user saved it" may be unclear, especially since most non-feedly devs won't be too familiar with the teams product.
There was a problem hiding this comment.
Ok I update the description then
|
Ok I have updated the description wrt. the user part by: |
Context:
We want to resort articles in a board.
To do that we first need to delete them, and re-tag them in the good order.
This should be done regardless of who saved the articles.
Compared to FeedlyUser.delete_tags, which worked on any streamable, and remove all tags that the user calling the method had created, TagBase.delete_tags removes only one tag per article, the tag corresponding to the id of TagBase, and that regardless of the user id.