Skip to main content

Crate mplib

Crate mplib 

Source
Expand description

§mplib - Micropub Publisher Library

A Rust library for publishing text-only blog posts to Micropub endpoints.

§Example

! ```rust use mplib::{MicropubService, Post, publish_post};

fn main() { let service = MicropubService::new(“https://example.com/micropub”, “your_access_token”); let post = Post::new(“Hello, world!”, None); match publish_post(&service, &post) { Ok(result) => println!(“Post published successfully: {:?}”, result), Err(e) => eprintln!(“Failed to publish post: {}”, e), } }

Structs§

MicropubService
Post
Represents a post to be published.
PostResult
Represents a micropub endpoint’s response to a request to publish a post.

Enums§

PostStatus
Represents the status of a post, either published or draft.

Functions§

publish_post
Publish a Post via a Micropub service.