stock news thing

This commit is contained in:
2025-01-10 23:21:33 -06:00
commit 10ab734f13
4 changed files with 1939 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
**/target

1904
stock_news_publisher/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
[package]
name = "stock_news_publisher"
version = "0.1.0"
edition = "2021"
[dependencies]
log = "0.4.24"
simple_logger = "5.0.0"
redis = "0.28.0"
reqwest = {version = "0.12.12", features = ["blocking"]}
rmp-serde = "1.3.0"
serde = "1.0.217"

View File

@@ -0,0 +1,22 @@
use log::info;
use redis::{Client, Commands};
use std::thread;
pub const NEWS_API_KEY: &str = "QdRyR4ztkKKeBq8btsOW0QVpiHWPQDnCRa6rBUkG";
fn main() {
println!("Hello, world!");
simple_logger::init().unwrap();
info!("Logging operational");
// program the publpisher here
let client = Client::open("redis::/192.168.1.23/").unwrap();
let mut connection = client.get_connection().unwrap();
}
#[derive(Debug, Copy, Clone)]
struct Notification{
}