downloader

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package downloader manages grabbing CSV from Concept2 website Simply grab a downloader and either call GetSeasons or GetAllSeasons

path, _ := filepath.Abs("./data")
dl := downloader.NewDownloader("myuser", "mypassword", path)
dl.SetHeadless(false)
dl.GetSeasons([]string{"2021"})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	// Username Concept 2 username
	Username string
	// Password Concept 2 password
	Password string
	// Path The location where data files will be saved to
	Path string
	// contains filtered or unexported fields
}

Downloader manages the download options

func NewDownloader added in v0.2.0

func NewDownloader(username string, password string, path string) Downloader

NewDownloader generates a new downloader with default options

func (Downloader) GetAllSeasons added in v0.2.0

func (dl Downloader) GetAllSeasons()

GetAllSeasons downloads all of the available seasons

func (Downloader) GetSeasons

func (dl Downloader) GetSeasons(seasons []string)

GetSeasons downloads the seasons CSV data from C2 site into the Downloader struct's path

func (*Downloader) SetHeadless added in v0.2.0

func (dl *Downloader) SetHeadless(headless bool)

SetHeadless sets whether the browser should be headless or not

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL