Skip to content

Commit

Permalink
Merge branch 'db0:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
i-be-snek authored Jun 29, 2023
2 parents 7adaa0e + 7c2a751 commit f2e84b9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [Unreleased](https://github.com/db0/pythorhead/tree/HEAD)

[Full Changelog](https://github.com/db0/pythorhead/compare/v0.9.3...HEAD)

**Fixed bugs:**

- Create community broken [\#35](https://github.com/db0/pythorhead/issues/35)

## [v0.9.3](https://github.com/db0/pythorhead/tree/v0.9.3) (2023-06-29)

[Full Changelog](https://github.com/db0/pythorhead/compare/v0.9.2...v0.9.3)

**Merged pull requests:**

- fix create community [\#36](https://github.com/db0/pythorhead/pull/36) ([NicKoehler](https://github.com/NicKoehler))
- Remove logging.basicConfig statement [\#32](https://github.com/db0/pythorhead/pull/32) ([hjalp](https://github.com/hjalp))

## [v0.9.2](https://github.com/db0/pythorhead/tree/v0.9.2) (2023-06-26)

[Full Changelog](https://github.com/db0/pythorhead/compare/v0.9.1...v0.9.2)
Expand Down
2 changes: 1 addition & 1 deletion examples/pic.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
if not lemmy_password:
raise Exception("You need to provide a lemmy password via env var or arg")

lemmy = Lemmy(f"https://{lemmy_domain}")
lemmy = Lemmy(f"http://{lemmy_domain}")
if not lemmy.log_in(lemmy_username, lemmy_password):
print("Failed to log in")
exit(1)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "A python library for interacting with Lemmy API"
authors = [
{name = "db0", email = "[email protected]"},
]
version = "v0.9.2"
version = "v0.9.3"
readme = "README.md"
requires-python = ">=3.8,<3.12"
license = { file="LICENSE" }
Expand Down
6 changes: 3 additions & 3 deletions pythorhead/community.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional
from typing import Any, List, Optional

from pythorhead.requestor import Request, Requestor
from pythorhead.types import ListingType, SortType
Expand Down Expand Up @@ -31,7 +31,7 @@ def create(
Returns:
Optional[dict]: post data if successful
"""
new_community: dict = {
new_community: dict[Any, Any] = {
"name": name,
"title": title,
}
Expand All @@ -44,7 +44,7 @@ def create(
if [posting_restricted_to_mods] is not None:
new_community["[posting_restricted_to_mods]"] = [posting_restricted_to_mods]

return self._requestor.api(Request.POST, "/post", json=new_community)
return self._requestor.api(Request.POST, "/community", json=new_community)

def get(self, id: Optional[int] = None, name: Optional[str] = None) -> Optional[dict]:
"""
Expand Down

0 comments on commit f2e84b9

Please sign in to comment.