Bug 486360 - No support for date ranges in generated download urls
Summary: No support for date ranges in generated download urls
Status: RESOLVED FIXED
Alias: None
Product: libalkimia
Classification: Frameworks and Libraries
Component: Online quotes widget (show other bugs)
Version: master
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-30 18:10 UTC by Ralf Habacker
Modified: 2024-05-04 09:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 8.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-04-30 18:10:50 UTC
SUMMARY
yahoo currently has their api for downloading citations in csv format. See the following example

https://query1.finance.yahoo.com/v7/finance/download/EURUSD=X?period1=1682874783&period2=1714497183&interval=1d&events=history&includeAdjustedClose=true

It contains two parameters (period1, period2) to specify the desired date range. If these parameters are removed from the URL as shown below: 

https://query1.finance.yahoo.com/v7/finance/download/EURUSD=X?interval=1d&events=history&includeAdjustedClose=true

only data for the current day is downloaded. 

Alkimia from the git master branch currently has no support for specifying corresponding parameters.

STEPS TO REPRODUCE
1. Inspect the source code where the url is generated from the template (https://invent.kde.org/office/alkimia/-/blame/master/src/alkonlinequote_p.cpp?ref_type=heads#L110)

OBSERVED RESULT
There is currently no support for date ranges in the generated url.

EXPECTED RESULT
Date ranges should be support in generated urls
Comment 1 Bug Janitor Service 2024-04-30 19:21:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/alkimia/-/merge_requests/40
Comment 2 Ralf Habacker 2024-05-04 09:30:40 UTC
Git commit c957b17d1ed9abbeea2a27854505edec87c9dc88 by Ralf Habacker.
Committed on 04/05/2024 at 09:04.
Pushed by habacker into branch 'master'.

Add support to use unix timestamps in online quote urls

Unix timestamps are supported by using '%unix' or '%25unix'
FIXED-IN:8.2

M  +26   -0    autotests/alkonlinequoteprivatetest.cpp
M  +1    -0    autotests/alkonlinequoteprivatetest.h
M  +55   -0    src/alkonlinequote_p.cpp
M  +7    -0    src/alkonlinequote_p.h

https://invent.kde.org/office/alkimia/-/commit/c957b17d1ed9abbeea2a27854505edec87c9dc88