archiveis 0.1.1

Archive websites online using the archive.is capturing service.
Documentation

archiveis-rs

Build Status Released API docs

Provides simple access to the Archive.is Capturing Service. Archive any url and get the corresponding archive.is link in return.

Full example

The ArchiveClient is build with hyper and therefor uses futures for its services.

extern crate archiveis;
extern crate futures;
extern crate tokio_core;

use archiveis::ArchiveClient;
use futures::future::Future;
use tokio_core::reactor::Core;

fn main() {
 let mut core = Core::new().unwrap();

 let client = ArchiveClient::new(Some("archiveis (https://github.com/MattsSe/archiveis-rs)"));
 let url = "http://example.com/";
 let capture = client.capture(url).and_then(|res| {
     if let Some(archived) = res {
        println!("targeted url: {}", archived.target_url);
        println!("url of archived site: {}", archived.archived_url);
        println!("archive.is submit token: {}", archived.submit_id);
     }
     Ok(())
 });

 core.run(capture).unwrap();
}