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

Not consistent use of expires_in vs expires_at with filters #294

Open
e11bits opened this issue Dec 4, 2022 · 1 comment
Open

Not consistent use of expires_in vs expires_at with filters #294

e11bits opened this issue Dec 4, 2022 · 1 comment

Comments

@e11bits
Copy link

e11bits commented Dec 4, 2022

The filter_dict, that the reading methods Mastodon.filters or Mastodon.filter return, uses the key expires_at.

But the writing methods Mastodon.filter_create or Mastodon.filter_update use expires_in as a keyword.

If the filter_dict would match the keyword parameters of the methods, it would be easier to use the unpacking operator (**) like (with id removed from the filter_dict)

Mastodon.filter_update(**filter_dict)

@halcy
Copy link
Owner

halcy commented Dec 4, 2022

That sounds like a good idea, though probably, we should support both (the mastodon API takes them as expires_in). Not really a problem, though, can just convert the time as appropriate.

However, as far as I know, the filter API as it currently is implemented works only on pre-4.0. So probably it is better to change this after making all 4.0 related updates. I'm currently taking a short break from maintenance to do some other things, dogfooding mastodon.py being one of those things, but I'll get back to it soon enough.

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