tumblr_api
A rust implementation of the Tumblr API.
This is still very much in beta! see Major Planned/Unimplemented Features
Examples
Creating a simple post with the client
use ;
use npf;
let client = new;
client
.create_post
.send
.await?;
Creating a more complex post
use CreatePostState;
// load the image that we'll be attaching to the post.
let my_image = read?;
// (currently, you need to manually create the reqwest::Body to pass in. that'll probably
// change in a future version.)
let my_image = from;
client
.create_post
.add_attachment
// add tags to your post
// (this is currently a string since that's what the underlying api takes.
// Being able to pass a Vec<String> instead is a planned feature but hasn't been
// implemented quite yet.)
.tags
// add the post to your queue instead of immediately posting it
.initial_state
.send
.await?;
Modules & Feature Flags
This library is split into 3 modules - client, api, and npf - and each has a feature flag of the same name that controls whether it's enabled.
Major Planned/Unimplemented Features
- implement remaining api endpoints (currently it's just post creation plus a couple others)
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.