Fedihosting-Foundation / plemmy

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

get_posts places `community_id` in the headers when it should be a parameter #10

Closed ajstamps closed 1 year ago

ajstamps commented 1 year ago

God I hope I didn't accidentally dump my creds.

In case I'm using it wrong, here is the code with the important bits changed:

from plemmy import LemmyHttp

community_id = 60412  # this is just a test community
srv = LemmyHttp("https://lemmy.world")

srv.login("<username>", "<password>")
posts = srv.get_posts(community_id=community_id)

print(posts.json())

currently (from what I can tell) it just grabs the latest posts from the Lemmy instance.

Link to community for your convenience

Postman tests: Param: image

Header: image

tjkessler commented 1 year ago

Hi @ajstamps,

Nice find, should be fixed as of https://github.com/tjkessler/plemmy/pull/11, newest version will be 0.2.6! I believe this issue is similar to the one found in https://github.com/tjkessler/plemmy/pull/3.

Let me know if you're still having trouble and we'll re-open the issue!

Travis

ajstamps commented 1 year ago

Ah, missed that. My bad, thanks for the quick updates!