🐰 Rust client library for the Leap Edge socket service

Overview

leap_edge_rs

Utility library for connecting and receiving events from Leap Edge. Used for Channels and Pipe.

Installation

Add this to your Cargo.toml:

[dependencies]
leap_edge_rs = "0.1"

or if you want to add features:

[dependencies.leap_edge_rs]
version = "0.1"
default-features = false
features = ["rustls-tls-webpki-roots", "zlib"]

Usage

Subscribe to a channel

use leap_edge_rs::{LeapEdge, LeapOptions, leap::types::Event};

#[tokio::main]
async fn main() -> Result<(), std::io::Error> {
    let leap = LeapEdge::new(LeapOptions {
        project: "my-project",
        ..Default::default()
    }).await?;

    leap.channel_subscribe("my-channel").await?;

    while let Some(event) = leap.listen().await {
        println!("{:?}", event);
    }
}

Get all events:

use leap_edge_rs::{LeapEdge, LeapOptions};

#[tokio::main]
async fn main() -> Result<(), std::io::Error> {
    let leap = LeapEdge::new(LeapOptions {
        project: "my-project",
        ..Default::default()
    }).await?;

    while let Some(event) = leap.listen().await {
        println!("{:?}", event);
    }
}

Get only messages or direct messages:

use leap_edge_rs::{LeapEdge, LeapOptions, leap::types::Event};

#[tokio::main]
async fn main() -> Result<(), std::io::Error> {
    let leap = LeapEdge::new(LeapOptions {
        project: "my-project",
        ..Default::default()
    }).await?;

    while let Some(event) = leap.listen().await {
        match event {
            Event::Message(message) | Event::DirectMessage(message) => println!("{:?}", message),

            _ => {}
        }
    }
}
You might also like...
Onlyfans-type web service based on TOR with maximum privacy features.

onionfans Onlyfans-type web service based on TOR with maximum privacy features. Features "Vanishing" single-use feed CDN links Landing page No JavaScr

An easily deployable service to monitor mission-critical SPL token accounts
An easily deployable service to monitor mission-critical SPL token accounts

Vault watcher Monitoring critical spl-token accounts in real time Table of contents Introduction Usage Configuration Configuration examples Grafana In

High-level networking library that extends the bevy_replicon library to allow snapshot interpolation and client-side prediction

bevy_replicon_snap A Snapshot Interpolation plugin for the networking solution bevy_replicon in the Bevy game engine. This library is a very rough pro

In addition to encryption library, pure RUST implementation of SSH-2.0 client protocol

In addition to encryption library, pure RUST implementation of SSH-2.0 client protocol

Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library

Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library. ENS address: rust-web3.eth

Rust client library for Flashbots MEV-Share

Flashbots MEV-Share Client   Rust client library for Flashbots MEV-Share. Based on the MEV-Share specs and the TypeScript reference implementation. Us

Reference library that implements all the necessary functionality for developing a client that is compatible with TAPLE's DLT network.
Reference library that implements all the necessary functionality for developing a client that is compatible with TAPLE's DLT network.

⚠️ TAPLE is in early development and should not be used in production ⚠️ TAPLE Core TAPLE (pronounced T+ 🍎 ['tapəl]) stands for Tracking (Autonomous)

RGB smart contracts: client-facing library & command-line for desktop and mobile

RGB smart contracts RGB is confidential & scalable client-validated smart contracts for Bitcoin & Lightning. It embraces the concepts of private & mut

Coinbase pro client for Rust

Coinbase pro client for Rust Supports SYNC/ASYNC/Websocket-feed data support Features private and public API sync and async support websocket-feed sup

Releases(v0.1.0)
Owner
Hop
The Realtime Engine. Coming soon to a 0.0.0.0/0 near you.
Hop
Easy setup for Edge host.

Pod's Edge Staking GUI (beta) Features Easily setup your Edge host with a GUI (Graphical User Interface). Uses the device token staking method. Has no

null 3 Apr 29, 2023
Rust API Client for ImageKit.io a file storage and image processing service

Rust API Client for ImageKit.io a file storage and image processing service Usage You must retrieve your Public and Private Keys from the ImageKit Dev

Esteban Borai 4 Jul 31, 2022
Gnosis Safe Tx Service API client & associated tooling

Safe Transaction Service API Client Using the SDK Instantiate an API client use safe_sdk::SafeClient; /// From a chain id, by looking up hardcoded en

Nomad 3 Dec 15, 2022
An efficient, robust, and generalized batch submission service for rollup stacks written in pure rust.

archon is an efficient, robust, and generalized batch submission service for rollup stacks written in pure rust. Note Archon is primarily tested again

refcell.eth 75 Apr 2, 2023
a simple rust service for Scheduling commands execution on time basis, an easy alternative to cron

Tasker A Simple crate which provides a service and a configuration API for genrating commands based tasks ,on time basis. Installation build from sour

Daniel Madmon 5 Jun 1, 2023
A file storage service

hashfs A file storage service How to use it? Start up the service at terminal # You can specify the storage root path and access domain when you start

null 17 Dec 18, 2021
Smart Contract for Terra Name Service

TERRA NAME SERVICE CONTRACTS Terra Name Service is to create easy-to-remember names for your Terra address like ‘dokwon.ust’ instead of ‘terra1...whez

null 12 Nov 23, 2022
All the data an IC app needs to make seamless experiences, accessible directly on the IC. DAB is an open internet service for NFT, Token, Canister, and Dapp registries.

DAB ?? Overview An Internet Computer open internet service for data. All the data an IC app needs to make a seamless experience, accessible directly o

Psychedelic 58 Oct 6, 2022
Unified directories for different use cases of an application, providing standard directories for local development, when run as service or when run by a user.

UniDirs Unified directories for different use cases of an application, providing standard directories for local development, when run as service or wh

Dominik Nakamura 3 Sep 30, 2022
Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

BPNS 1 May 2, 2022