Releases: Fedihosting-Foundation/plemmy
0.3.0 - parsing `request.Response` JSON into Python objects
As the title suggests, various functions/classes have been implemented to help users parse Lemmy API responses (requests.Response
objects) into easily-usable Python objects. These functions/classes were designed based on how the lemmy-js-client handles responses and data types (person, comment, community, etc.).
For example:
from plemmy import LemmyHttp
from plemmy.responses import GetCommunityResponse
# create object for `Lemmy.ml`, log in
srv = LemmyHttp("https://lemmy.ml")
srv.login("<username_or_email>", "<password>")
# obtain community, parse response
api_response = srv.get_community(name="Lemmy") # returns `requests.Response` object
response = GetCommunityResponse(api_response)
# print community info
community = response.community_view.community
print(community.name)
print(community.actor_id)
print(community.id)
Full documentation is on its way, in the meantime browse our source code and examples!
0.2.6 (fixes to GET operations)
0.2.5
Added timeout functionality to Plemmy requests. On slow servers the requests can hang indefinitely requiring a stop and restart of the script. Set the timeout to 30 seconds.
Thanks to @socphoenix for the contribution!
0.2.4 (bug fix)
The edit_community
function pointed to the wrong API endpoint. Fixed by @benja810, thanks for the contribution!
0.2.3 - new features, fixes
- Added all emoji-related API calls
- create, edit, delete custom emojis
- Added new functions get_comment and get_federated_instances
- Other fixes per LemmyHttp updates
0.2.2
0.2.1
0.2.0
- Added all remaining functions found in the LemmyHttp documentation
- includes all POST, PUT, and GET operations
- functions need testing!!
- Next up:
- unit testing
- full documentation
- example scripts
Initial release (0.1.0)
Just getting the project out there! Basic functionality has been implemented (log in, create comments/posts/communities, a few more), and more is to come. I'm writing methods alphabetically from LemmyHttp's documentation.