package flashscore

import (
	"log"

	"gordenko.dev/dima/flashscore/model"
	"gordenko.dev/dima/qx"
	webspider "gordenko.dev/dima/spider"
)

func New(qxdb *qx.Db, logger *log.Logger) *Flashscore {
	s := new(Flashscore)
	s.model = model.New(qxdb)
	s.logger = logger

	var err error

	s.spider, err = webspider.NewSpider(nil)
	if err != nil {
		panic(err)
	}
	return s
}
