groupme_bot 0.1.2

Rust library wrapper for Groupme bots API.
Documentation
extern crate groupme_bot;

use groupme_bot::Groupme;

use std::{thread, time};
use std::env;

fn main() {
    let token = &env::var("GROUPME_TOKEN").unwrap();
    let group_id = &env::var("GROUPME_GROUP").unwrap();

    let groupme = Groupme::new(Some(token));
    let bot = groupme
        .create_bot("My Bot", group_id)
        .unwrap()
        .create()
        .unwrap();

    // Wait 5 seconds
    thread::sleep(time::Duration::new(5, 0));

    bot.post("Hello, world!").unwrap();

    thread::sleep(time::Duration::new(2, 0));

    groupme.destroy(bot).unwrap();
}