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 1 year ago • 2 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