๐Ÿฆ€ In progress Rust library for dogehouse.tv ๐Ÿฆ€

Overview

dogehouse-rs

WARNING: Still work in progress do not use yet

Example

In Cargo.toml
dogehouse-rs = "*"
In src/main.rs
use dogehouse_rs::prelude::*;
use dogehouse_rs::Message;
use dotenv::dotenv;
use std::env;

struct Handle;

impl Handler for Handle { 
  
  fn on_ready(&self, user: String) {
    println!("{}", user);
  }
  
  fn on_message(&self, msg: &Message) {
    println!("{:?}", msg); 
  }
}

fn main() {
  dotenv().ok();
  let token = env::var("token")
    .expect("could not find token");

  let refresh_token = env::var("refresh_token")
    .expect("could not find token");

  let mut client = Client::new(token, refresh_token)
    .add_handler(Handle);

                                 // Room id
  if let Err(err) = client.start("3daf5a80-5b0a-4dde-9527-9db1f7f13755") {
    println!("{}", err.to_string());
  }
}

Testing

cargo test -- --nocapture
You might also like...
Functional Reactive Programming library for Rust

Carboxyl is a library for functional reactive programming in Rust, a functional and composable approach to handle events in interactive applications.

A library for transcoding between bytes in Astro Notation Format and Native Rust data types.

Rust Astro Notation A library for transcoding between hexadecimal strings in Astro Notation Format and Native Rust data types. Usage In your Cargo.tom

A rust library that provides pseudo-reflection for structs and enums

Treeflection treeflection_derive Treeflection runs a command stored as a string on a tree of structs, collections and primitive types. Commands A comm

List public items (public API) of Rust library crates. Enables diffing public API between releases.

cargo wrapper for this library You probably want the cargo wrapper to this library. See https://github.com/Enselic/cargo-public-items. public_items Li

A simple thread schedule and priority library for rust

thread-priority A simple library to control thread schedule policies and thread priority. If your operating system isn't yet supported, please, create

Library for abstract mathematics written by Rust. It is aiming to replace SageMath.

ankolib Roadmap Mathematical Structures Sets Monoids Groups Semirings Rings Algebras Basic Rings and Fields Integers and Rational Numbers Integer Rati

Rust Library for controlling divoom devices that support REST APIs, such as pixoo-64.
Rust Library for controlling divoom devices that support REST APIs, such as pixoo-64.

Divoom Rust Library for controlling divoom devices that support REST APIs, such as pixoo-64 (and from how divoom's api/doc organizes, maybe more in th

A simple /proc/pid/{mem,maps} library for Rust

Summary A very simple library that wraps around /proc/pid/mem and /proc/pid/maps to read memory out of a running process on Linux. Usage Basic usage l

rust channel benchmarks to keep stat of performance of Kanal library in comparison with other competitors.
rust channel benchmarks to keep stat of performance of Kanal library in comparison with other competitors.

Rust Channel Benchmarks This is a highly modified fork of the crossbeam-channel benchmarks. to keep track of Kanal library stats in comparison with ot

A library for extracting #[no_mangle] pub extern "C" functions (https://docs.rust-embedded.org/book/interoperability/rust-with-c.html#no_mangle)

A library for extracting #[no_mangle] pub extern "C" functions In order to expose a function with C binary interface for interoperability with other p

Dmitrii - Demenev 0 Feb 17, 2022
Rust Imaging Library: A high-level Rust imaging crate.

ril Rust Imaging Library: A performant and high-level Rust imaging crate. Documentation โ€ข Crates.io โ€ข Discord What's this? This is a Rust crate design

Jay3332 18 Jan 5, 2023
Modern Rust utility library delivering modularity, performance & extras; or simply Rust version of Lodash

Lorust - API Documentation Lorust is the Rust version of Lodash, which is a modern Javascript utilty library delivering modularity, performance & extr

Imamuzzaki Abu Salam 2 Jul 9, 2023
Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.

Speedy2D Hardware-accelerated drawing of shapes, images, and text, with an easy to use API. Speedy2D aims to be: The simplest Rust API for creating a

null 223 Dec 26, 2022
Shuttle is a library for testing concurrent Rust code

Shuttle Shuttle is a library for testing concurrent Rust code. It is an implementation of a number of randomized concurrency testing techniques, inclu

Amazon Web Services - Labs 373 Dec 27, 2022
Comprehensive DSP graph and synthesis library for developing a modular synthesizer in Rust, such as HexoSynth.

HexoDSP - Comprehensive DSP graph and synthesis library for developing a modular synthesizer in Rust, such as HexoSynth. This project contains the com

Weird Constructor 45 Dec 17, 2022
Fluent assertion library for Rust with readable messages.

Assertor Assertor makes test assertions and failure messages more human-readable. Assertor is heavily affected by Java Truth in terms of API design an

Google 20 Dec 12, 2022
Highly experimental, pure-Rust big integer library

grou-num (Pronounced "groo", from the Chiac meaning "big") This package is a highly experimental, unstable big integer library. I would not recommend

Patrick Poitras 1 Dec 18, 2021
"Crates for Cheese" is a Rust collection library of those crates I consider a useful "extended standard".

cfc The purpose of this library is to provide a minimal list of currated crates which enhance the std library. In addition, most or all crates in this

null 0 Dec 23, 2021
An advanced, reactive UI library for Rust

An advanced, reactive UI library for Rust Report a Bug ยท Request a Feature . Ask a Question What is agui? Agui is an advanced reactive GUI project for

Trevin Miller 28 Nov 26, 2022