mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 01:02:01 +03:00
Merge 230019651b into 37cfd2144b
This commit is contained in:
commit
2c269b974e
3 changed files with 11 additions and 1 deletions
8
src-tauri/Cargo.lock
generated
8
src-tauri/Cargo.lock
generated
|
|
@ -3743,6 +3743,8 @@ dependencies = [
|
||||||
"tauri-plugin-process",
|
"tauri-plugin-process",
|
||||||
"tauri-plugin-single-instance",
|
"tauri-plugin-single-instance",
|
||||||
"tauri-plugin-updater",
|
"tauri-plugin-updater",
|
||||||
|
"url",
|
||||||
|
"urlencoding",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -4739,6 +4741,12 @@ dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "urlencoding"
|
||||||
|
version = "2.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "urlpattern"
|
name = "urlpattern"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ serde_json = "1"
|
||||||
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "stream"] }
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "stream"] }
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
futures = "0.3.32"
|
futures = "0.3.32"
|
||||||
|
url = "2.5.8"
|
||||||
|
urlencoding = "2.1.3"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
strip = true
|
strip = true
|
||||||
|
|
|
||||||
|
|
@ -494,7 +494,7 @@ async fn fetch_market_data(
|
||||||
async move {
|
async move {
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"https://query1.finance.yahoo.com/v8/finance/chart/{}?range=1d&interval=1d",
|
"https://query1.finance.yahoo.com/v8/finance/chart/{}?range=1d&interval=1d",
|
||||||
sym
|
urlencoding::encode(sym)
|
||||||
);
|
);
|
||||||
if let Ok(resp) = client.get(&url).send().await {
|
if let Ok(resp) = client.get(&url).send().await {
|
||||||
if let Ok(body) = resp.json::<serde_json::Value>().await {
|
if let Ok(body) = resp.json::<serde_json::Value>().await {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue