add DownloadBnnlists
This commit is contained in:
parent
f4bae2a9b8
commit
3af92fa056
|
@ -168,6 +168,25 @@ func DownloadPricelists(client *http.Client) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// DownloadBnnlists - Download both price lists. The lists are public so we do not necessarily login before downloading.
|
||||
func DownloadBnnlists(client *http.Client) error {
|
||||
// Download PL.BNN
|
||||
r, err := client.Get("https://static.paxan.de/2016/PL.BNN")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
downloadFile(("PL-" + time.Now().Format("20060102150405") + ".BNN"), r)
|
||||
|
||||
// Download PLF.BNN
|
||||
r, err = client.Get("https://static.paxan.de/2016/PLF.BNN")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
downloadFile(("PLF-" + time.Now().Format("20060102150405") + ".BNN"), r)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RetrievePricelist - Downloads and converts pricelist into an array
|
||||
func RetrievePricelist(client *http.Client) ([]SpricelistEntry, error) {
|
||||
// Download spreisliste
|
||||
|
|
Loading…
Reference in New Issue