this post was submitted on 26 Jun 2023
7 points (100.0% liked)

Rust Programming

7734 readers
1 users here now

founded 5 years ago
MODERATORS
 

I recently made a community for bird identification (check us out here ).

I would like to make a bot that would take in a bird name like this [[American Robin]] and comment back with links to more information. I can do the links for birds easily but the bot side I don't know. Does anyone have any examples of Lemmy bots written in rust that do something similar? Or at least a source on where to start?

The final code would be open source if that matters to people. Thank you in advance.

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 year ago

Here's the Lemmy HTTP API documentation.

In Rust, you can use a HTTP client like reqwest and the lemmy_api_common crate (along with the lemmy_api and lemmy_api_crud crates in the README) which provides the data types needed to send/receive data when making HTTP requests.