1 unstable release

Uses old Rust 2015

0.1.0 Oct 14, 2015

#11 in #medium

MIT license

9KB
241 lines

medio

Build Status

rustlang bindings to Medium.com api

apidocs

Find them here

usage

To get started, you'll want grab an integration token from you're medium.com accounts settings page.

extern crate hyper;
extern crate medio;

use hyper::Client;
use medio::{Medium, NewPost};
use std::default::Default;

fn main() {
    let client = Client::new();
    let medium = Medium::new(
        &client,
        Some("t0k3n")
    );
    // fetch a reference to authenticated user info
    let me = medium.me().unwrap();
    medium.users(&me.id).post(
        &NewPost {
           title: "hello rust",
           content: &format(
              r#" # hello medium.

                    meet rust.

                    love @{}.
                "#, me.username
           ),
           tags: Some(
               vec!["rust"]
           ),
           ..Default::default()
        }
    );
}

Doug Tangren (softprops) 2015

Dependencies

~5MB
~94K SLoC