2026-07-21 03:49:47 +03:00
|
|
|
package flashscore
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"encoding/json"
|
|
|
|
|
"fmt"
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
_ "github.com/go-sql-driver/mysql"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
func TestFixtures(t *testing.T) {
|
|
|
|
|
var err error
|
|
|
|
|
//'req, err := http.NewRequest("GET", url, nil)
|
|
|
|
|
|
|
|
|
|
logger := log.New(os.Stdout, "", log.LstdFlags)
|
|
|
|
|
|
2026-07-21 05:33:54 +03:00
|
|
|
db, err := qx.Open("mysql", "user:password@/tipper")
|
2026-07-21 03:49:47 +03:00
|
|
|
if err != nil {
|
|
|
|
|
panic(err)
|
|
|
|
|
}
|
|
|
|
|
defer db.Close()
|
|
|
|
|
|
|
|
|
|
fs := New(db, logger)
|
|
|
|
|
round, err := fs.ListFootballChampNextRoundFixtures("/germany/3-liga")
|
|
|
|
|
if err != nil {
|
|
|
|
|
fmt.Printf("ListFootballChampFixtures: %s\n", err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buf, _ := json.MarshalIndent(round, "", " ")
|
|
|
|
|
fmt.Printf("%s\n", buf)
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
func TestFootballListOfScheduledMatches(t *testing.T) {
|
|
|
|
|
result, err := listOfScheduledMatches(Football)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buf, _ := json.MarshalIndent(result, "", " ")
|
|
|
|
|
fmt.Printf("ListOfScheduledMatches: %s\n", buf)
|
|
|
|
|
}
|