halcy / Mastodon.py

Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.
MIT License
882 stars 150 forks source link

Any plans to allow retrieving of followed tags? #309

Open BackSeat opened 1 year ago

BackSeat commented 1 year ago

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)
halcy commented 1 year ago

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.

BackSeat commented 1 year ago

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

haraldg commented 2 months ago

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