A rich and hybrid mystb.in API wrapper for Rust 🦀
Introduction
myust is a rich and hybrid Rust wrapper for the mystb.in API that aims for user-flexibility.
myust supports hybrid clients:
- Asynchronous: Client and AuthClient.
- Synchronous: SyncClient and SyncAuthClient.
Which one do I use?
It depends on your usecase, if you're not doing anything with anything users-related endpoints, use Client. It only wraps non-users endpoints.
Otherwise, use AuthClient. It wraps both users and non-users endpoints. And the benefit of using AuthClient is mystb.in gives you more ratelimit credits for authorized requests.
Installation
Add myust = "0.1" to your Cargo.toml file.
[]
= "0.1"
= "1.27.0"
Usage Examples
Asynchronously creating a paste with tomorrow expiration date, with error handling:
use ;
use Client;
async
Synchronously creating a multifile paste with a password:
use SyncClient;
Asynchronously deleting a paste (you must own the paste):
use AuthClient;
async
You can check for another example snippets in the test file.
Help
If you need any help regarding myust, feel free to open an issue about your problem.