Mastodon.py icon indicating copy to clipboard operation
Mastodon.py copied to clipboard

Any plans to allow retrieving of followed tags?

Open BackSeat opened this issue 2 years ago • 3 comments

I appreciate it's a v4 function. I put this together as proof of concept and it seems to work, but I wouldn't claim to have tested it comprehensively.

    @api_version("4.0.0", "4.0.0", _DICT_VERSION_ACCOUNT)
    def tag_following(self, max_id=None, min_id=None, since_id=None, limit=None):
        """
        Fetch tags the given user is following.

        Returns a list of tags dicts
        """
        if max_id is not None:
            max_id = self.__unpack_id(max_id, dateconv=True)

        if min_id is not None:
            min_id = self.__unpack_id(min_id, dateconv=True)

        if since_id is not None:
            since_id = self.__unpack_id(since_id, dateconv=True)

        params = self.__generate_params(locals(), ['id'])
        url = '/api/v1/followed_tags'
        return self.__api_request('GET', url, params)

BackSeat avatar Jan 06 '23 10:01 BackSeat

Oh, 4.x support is definitely planned. I just haven't gotten to it, I kind of burned myself out in december and figured it'd be a good time for a break for a bit. I'll probably start working on 4.0 features in earnest latter half of January, and when that time comes, I'll gladly merge that in and write some tests for it.

halcy avatar Jan 06 '23 11:01 halcy

Sounds good, thank you for providing Mastodon.py in the first place.

BackSeat avatar Jan 06 '23 16:01 BackSeat

FWIW: I'd also like to retrieve followed tags.

haraldg avatar Sep 04 '24 19:09 haraldg