goofy

Crates.iogoofy
lib.rsgoofy
version0.2.0
sourcesrc
created_at2020-10-26 20:52:14.543829
updated_at2020-10-31 11:56:32.027632
descriptionRust bindings to the mobile instagram API
homepage
repositoryhttps://github.com/yvessavoy/goofy
max_upload_size
id305744
size14,718
Yves Savoy (yvessavoy)

documentation

https://docs.rs/goofy

README

Goofy

Goofy provides rust bindings to the mobile instagram API.

Goofy by example

Get a profile by username

use goofy::Client;

fn main() {
    let username = "foo";
    let password = "bar";
    let client = Client::new(username, password).expect("Could not create client");
    let profile = client.get_profile_by_username("mozilla");
    assert_eq!(profile.username, "mozilla");
}

Get a profile by user id

use goofy::Client;

fn main() {
    let username = "foo";
    let password = "bar";
    let client = Client::new(username, password).expect("Could not create client");
    let profile = client.get_profile_by_(7107542290);
    assert_eq!(profile.username, "mozilla");
}

Store a client to disk

This is especially useful when you repeatedly start your program. Storing the client to disk avoids repeated login and thus lowers the chance of getting blocked by instagram.

use goofy::Client;

fn main() {
    let username = "foo";
    let password = "bar";
    let client = Client::new(username, password).expect("Could not create client");
    client.export("goofy-session.txt").expect("Could not persist client to disk");
}
Commit count: 58

cargo fmt