fugle 0.2.1

A Simple, Lightweight, Fast and Safe Fugle Library
Documentation

fugle-rs

Build status Latest version Documentation License

A Simple, Lightweight, Fast and Safe Fugle Library.

What is Fugle

This is a rust version library to access Fugle's

  • RESTful API
  • Websocket (enable websocket feature)

services in a very easy way.

Examples

for more please reference to the examples folder

Fugle Chart

API

let agent = IntradayBuilder::new().build();
agent.chart("2884").call()?;

Websocket

let (tx, rx) = mpsc::channel();
let mut lis = listener::Intraday::new("demo", tx.clone());
                                                           
lis.chart("2884", true);
let response = rx.recv()?;

Fugle Quote

API

let agent = IntradayBuilder::new().build();
agent.quote("2884").call()?;

Websocket

let (tx, rx) = mpsc::channel();
let mut lis = listener::Intraday::new("demo", tx.clone());
                                                           
lis.quote("2884", true);
let response = rx.recv()?;

Fugle Meta

API

let agent = IntradayBuilder::new().build();
agent.meta("2884").call()?;

Websocket

let (tx, rx) = mpsc::channel();
let mut lis = listener::Intraday::new("demo", tx.clone());
                                                           
lis.meta("2884", true);
let response = rx.recv()?;

Fugle Dealts

API

let agent = IntradayBuilder::new().build();
agent.dealts("2884").call()?;