Fedihosting-Foundation / plemmy

A Python package for accessing the LemmyHttp API
Apache License 2.0
45 stars 15 forks source link

`block_community` does not work currently #17

Closed AndrewFlan closed 1 year ago

AndrewFlan commented 1 year ago

I made a script to block communities that was working fine a while ago, but now it seems that the block_community request returns a status code of 400 with a reason of Bad Request. I've tried with various instances and what not, but all seem to have the same outcome.

tjkessler commented 1 year ago

Hi @AndrewFlan,

This issue should be fixed as of PR https://github.com/tjkessler/plemmy/pull/18, see the PR for details. TL;DR, it looks like some API functions accept boolean values converted to strings, and others accept actual boolean values. Very strange.

Version 0.3.5 has the updates.

Best, Travis

tjkessler commented 1 year ago

Thinking out loud: going forward I'd like to implement some unit tests for API responses, nothing too intensive, just to make sure 200 responses are returned.

That should help us avoid bugs like this in the future!