Bug 486360

Summary: No support for date ranges in generated download urls
Product: [Frameworks and Libraries] libalkimia Reporter: Ralf Habacker <ralf.habacker>
Component: Online quotes widgetAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In: 8.2

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