Changeset 22 for trunk/UFioAPI.pas
- Timestamp:
- Mar 25, 2013, 11:47:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFioAPI.pas
r10 r22 6 6 7 7 uses 8 Classes, SysUtils, httpsend, ssl_openssl ;8 Classes, SysUtils, httpsend, ssl_openssl, dateutils; 9 9 10 10 type … … 23 23 function DownloadMonthly(Year, Id: Integer; Data: TStrings): Boolean; 24 24 function DownloadLast(Data: TStrings): Boolean; 25 function SetLastId(Id: Integer): Boolean; 26 function SetLastDate(Date: TDate): Boolean; 25 27 end; 26 28 … … 46 48 100..299: 47 49 begin 48 Data.LoadFromStream(HTTPSender.Document); 50 if Assigned(Data) then 51 Data.LoadFromStream(HTTPSender.Document); 49 52 Result := True; 50 53 end; //informational, success … … 85 88 end; 86 89 90 function TFioAPI.SetLastId(Id: Integer): Boolean; 91 begin 92 Result := Download('https://www.fio.cz/ib_api/rest/set-last-id/' + Token + 93 '/' + IntToStr(Id), nil); 94 end; 95 96 function TFioAPI.SetLastDate(Date: TDate): Boolean; 97 begin 98 Result := Download('https://www.fio.cz/ib_api/rest/set-last-date/' + Token + 99 '/' + IntToStr(YearOf(Date)) + '/' + IntToStr(MonthOf(Date)) + '/' + 100 IntToStr(DayOf(Date)), nil); 101 end; 102 87 103 end. 88 104
Note:
See TracChangeset
for help on using the changeset viewer.