A simple omegle API written in Rust

Overview

crates.io

omegalul-rs

omegalul-rs is a work-in-progress opensource library for building Omegle clients.

Features

Current Features

  • Fetching random server from omegle status servers
  • Starting a chat on the server
  • Fetching current chat event
  • Sending chat messages
  • Adding interests

Example usage

These is just a simple example usage, to find more example usages, visit the /examples directory. For more documentation, check out the documentation

println!("{}", &message), ChatEvent::Disconnected => println!("The user has disconnected... mean."), ChatEvent::Typing => println!("The user is typing... how exciting!"), _ => () } } } } } ">
    #[tokio::main]
    async fn main() {
        // get a random server to connect with, this server
        // is grabbed from the https://omegle.com/status path.
        if let Some(server_name) = get_random_server().await {
            println!("Connecting to {} server", server_name);

            // just create a new server - this is a simple struct and 
            // the Server::new(&str) method does nothing besides creating
            // a new object of the struct.
            let server = &mut Server::new(server_name.as_str(), vec!["hors".to_string(), "discord".to_string()]);

            // start the chat, this sends a POST message  
            // and connects to the current omegle server
            let chat = &mut server.start_chat().await;

            if let Some(chat) = chat {
                // indefinite loop to always get new events
                // from the current omegle chat.
                loop {
                    // fetch the current event, this may return 
                    // a ChatEvent::None value - this means
                    // there is no current event going on.
                    let event = chat.fetch_event().await;

                    match event {
                        ChatEvent::Message(message) => println!("{}", &message),
                        ChatEvent::Disconnected => println!("The user has disconnected... mean."),
                        ChatEvent::Typing => println!("The user is typing... how exciting!"),
                        _ => ()
                    }
                }
            }
        }
    }
You might also like...
ncnn Rust API.

rust-ncnn ncnn Rust API. Prequisition Rust Env $ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh CMake = 3.12 Rust cmake needs --paral

Rust crate for creating filters with DirectX shaders. Includes Scale, Color conversion using DirectX api.

DxFilter Scale and ColorConversion done with DirectX filters. You can also create your own filters with the provided api. Crate contains various tools

Examples of how to use Rust with Serverless Framework, Lambda, API Gateway v1 and v2, SQS, GraphQL, etc

Rust Serverless Examples All examples live in their own directories: project: there is nothing here, just a simple cargo new project_name with a custo

prelate-rs is an idiomatic, asynchronous Rust wrapper around the aoe4world API. Very much a WIP at this stage.
prelate-rs is an idiomatic, asynchronous Rust wrapper around the aoe4world API. Very much a WIP at this stage.

prelate-rs is an idiomatic, asynchronous Rust wrapper around the aoe4world API. Very much a WIP at this stage. Project Status We currently support the

Rust wrapper for the Google Places API. Access their hundreds of millions of places, reviews, and ratings.

Google Places API Working Examples cargo run --example nearby_search cargo run --example place_details cargo run --example find_place cargo run --exam

A scrapper that abstracts the IQ Option API calls into a Rust package.

IQ Option API - In Rust An abstraction of IQ Options API calls in a Rust library. License Licensed under either of MIT license (LICENSE-MIT or https:/

Rust API deployed on Vercel.

This project is a Rust API deployed on Vercel. It is designed for users to build Rust code which can then be called using POST requests. This repository is an easy to use Rust-Vercel API that can be amended for your own requirements.

Femtorinth is a library to interact with a sub-set of the Modrinth API.

Femtorinth Femtorinth is a rust library to interact with a sub-set of the Modrinth api, it only includes the api calls that don't need auth (a.k.a onl

C API to SpringQL (for embedded mode)

SpringQL C Client This repository is a C client for SpringQL and provides it provides: springql.h: C header file. libspringql_client.{so,dylib}: Share

Comments
  • Charset for randid incorrect

    Charset for randid incorrect

    Issue

    I made a fork of this library for creating an iced-rs Omegle client and kept getting a problem where the chat wouldn't connect properly. After a while I found this gist which explained the charset of the randid. It said that the letters and numbers are A-Z (Except O and I) and 2-9. The charset in the id module uses 1 and 0.

    opened by Maxty99 0
Owner
NV6
i code sometimes
NV6
An ActivityPub home server written in Rust, implementing the Mastodon API.

Tafarn An ActivityPub home server written in Rust, implementing the Mastodon API. At present no web UI is provided, the API is the only way to interac

✨ Q (it/its) ✨ 12 Jan 22, 2023
Simple ray tracer written in Rust

Simple ray tracer written in Rust from scratch I've just finished my first semester at the Faculty of Applied Mathematics and Computer Science at the

Vladislav 190 Dec 21, 2022
Simple Spreadsheet editor written in Rust

Rexcel Simple Spreadsheet editor written in Rust Keyboard Shortcuts: CTRL + S => Save CTRL + Q => Quit CTRL + W +> Save And Quit CTRL + ALT + S => Sav

Saulane 16 Dec 1, 2022
A simple code boilerplate generator written in Rust.

?? Cgen What is Cgen? A modern, cross-platform, multi-language boilerplate generator aimed to make your code generation less hectic! If you wish to su

Rithul Kamesh 1 Dec 25, 2021
A Diablo II library for core and simple client functionality, written in Rust for performance, safety and re-usability

A Diablo II library for core and simple client functionality, written in Rust for performance, safety and re-usability

null 4 Nov 30, 2022
Verbump - A simple utility written in rust to bump and manage git semantic version tags.

Verbump - A simple utility written in rust to bump and manage git semantic version tags.

Sarat Chandra 6 May 6, 2022
Dead simple, minimal SPDX License generator library written in Rust.

lice Dead simple, minimal SPDX License generator library written in Rust. Lice is in beta Install | User Docs | Crate Docs | Reference | Contributing

refcell.eth 9 Oct 22, 2023
High level rust abstractions for the libretro API

libretro-rs Design Philosophy The approach to this crate can best be summarized as wanting to expose all functionality, even if not idiomatically. The

null 9 Dec 25, 2022
Rust library for interacting with the VTube Studio API

vtubestudio-rs A library for interacting with the VTube Studio API. Basic usage This example creates a Client using the provided builder, which: conne

null 6 Dec 4, 2022
⚡️ Fast MagicString port driven by Rust and N-API

magic-string-rs 100% API compatible (port) MagicString by Rich-Harris implementation for Node and modern browsers, also, for rust, of course. Installa

Hana 35 Nov 21, 2022