db0 / pythorhead

A python library for interacting with Lemmy
GNU Affero General Public License v3.0
77 stars 25 forks source link

How do I use the search? #61

Closed 8ullyMaguire closed 1 year ago

8ullyMaguire commented 1 year ago

I've tried

search_results = lemmy.search(post_url)

but I get

AttributeError: 'Lemmy' object has no attribute 'search'
db0 commented 1 year ago

We don't have a generic search currently. We do have lemmy.discover_community()

NicKoehler commented 1 year ago

We don't have a generic search currently. We do have lemmy.discover_community()

I implemented it, maybe he have an old version?

db0 commented 1 year ago

Oh right yes https://github.com/db0/pythorhead/blob/74f2fb4248d30416fe43af72f7dc63d83bba12af/pythorhead/lemmy.py#L52 forgot about that

8ullyMaguire commented 1 year ago

You are right I hadn't upgraded sorry. This must be an API bug because I don't get any results even though it seems to be working.