@@ -39,7 +39,8 @@ pub enum BinaryResponse {
3939/// 
4040/// #[tokio::main] 
4141/// async fn main() -> anyhow::Result<()> { 
42- ///     let (mut client, mut stream) = LazerConsumerClient::start("wss://endpoint").await?; 
42+ ///     let mut client = LazerClient::new("wss://endpoint", "YOUR_ACCESS_TOKEN".to_string())?; 
43+ ///     let mut stream = client.start().await?; 
4344/// 
4445///     // Subscribe to price feeds 
4546///     client.subscribe(Request::Subscribe(SubscribeRequest { 
@@ -57,12 +58,14 @@ pub enum BinaryResponse {
5758pub  struct  LazerClient  { 
5859    endpoint :  Url , 
5960    access_token :  String , 
60-     ws_sender :  Option < futures_util:: stream:: SplitSink < 
61-         tokio_tungstenite:: WebSocketStream < 
62-             tokio_tungstenite:: MaybeTlsStream < tokio:: net:: TcpStream > , 
61+     ws_sender :  Option < 
62+         futures_util:: stream:: SplitSink < 
63+             tokio_tungstenite:: WebSocketStream < 
64+                 tokio_tungstenite:: MaybeTlsStream < tokio:: net:: TcpStream > , 
65+             > , 
66+             Message , 
6367        > , 
64-         Message , 
65-     > > , 
68+     > , 
6669} 
6770
6871impl  LazerClient  { 
@@ -89,8 +92,9 @@ impl LazerClient {
8992     /// Returns a stream of responses from the server 
9093     pub  async  fn  start ( & mut  self )  -> Result < impl  futures_util:: Stream < Item  = Result < Response > > >  { 
9194        let  url = self . endpoint . clone ( ) ; 
92-         let  mut  request = tokio_tungstenite:: tungstenite:: client:: IntoClientRequest :: into_client_request ( url) ?; 
93-         
95+         let  mut  request =
96+             tokio_tungstenite:: tungstenite:: client:: IntoClientRequest :: into_client_request ( url) ?; 
97+ 
9498        request. headers_mut ( ) . insert ( 
9599            "Authorization" , 
96100            format ! ( "Bearer {}" ,  self . access_token) . parse ( ) . unwrap ( ) , 
0 commit comments