To get a paste from pastemyst synchronously: ```rust use pastemyst::paste; use pastemyst::paste::PasteObject;
fn main() -> Result<(), Box
To create paste synchronously: ```rust use pastemyst::paste; use pastemyst::paste::PasteObject;
fn main() -> Result<(), Box
More from the examples and documentation.
| Feature | Support | Async | | :---------------------------------- | :-------: | -----: | | API v1 | ✔ | ⛔ | | API v2 | ✔ | ⛔ | | Get pastes | ✔ | ✔ | | Get private pastes | ✔ | ✔ | | Create pastes | ✔ | ✔ | | Create Private pastes* | ✔ | ✔ | | Edit pastes | ✔ | ✔ | | Delete pastes | ✔ | ✔ | | Get Users | ✔ | ✔ | | Check if a user exists | ✔ | ✔ | | Get a language by name | ✔ | ✔ | | Get a language by extension | ✔ | ✔ | | Time expires in to a unix timestamp | ✔ | ✔ |
✔ = Done/Implemented and fully functional
❌ = Not done/implemented
⛔ = N/A
*This also includes a paste to be tied to your account, or create a private/public paste, or with tags.
This is the current structure of the code:
./
├───.github/
│ ├─.workflows/
│ │ └─ rust.yml
│ └─ISSUE_TEMPLATES/
│ ├─ bug_report.md
│ ├─ feature_request.md
│ ├─ documentation.md
│ └─ question.md
├───examples/
│ ├─ paste.rs
│ ├─ time.rs
│ ├─ data.rs
│ └─ user.rs
├───src/
│ └─ lib.rs
├─── .gitattributes
├─── .gitignore
├─── Cargo.toml
├─── LICENSE
└─── README.MD
Being a Rust library, pastemyst-rs requires the Rust compiler installed. To check if it's installed, run: rustc --version
and cargo --version
to verify it. If it's not installed, install it from their site. Once that's cleared out; run cargo install
to get the packages. To test it on-hand, either
1. Create a main.rs with the main method and run those tests (cargo run
).
2. Run from the examples using cargo run --example example_name
, for example cargo run --example get_paste
.
If you want to use it in your rust application, it is recommended to get the crate from https://crates.io/crates/pastemyst.
In your Cargo.toml
file, under [dependencies]
paste this:
```toml
pastemyst = "
pastemyst = { version = "
pastemyst-rs uses SemVer.
Given a version number MAJOR.MINOR.PATCH, increment the
MAJOR
version when you make incompatible API changes,
MINOR
version when you add functionality in a backwards compatible manner, and
PATCH
version when you make backwards compatible bug fixes.Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
You can create an issue or just join the support (discord) server.