cmpscraper

package module
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

README

CMP Scraper

This is a simple package used to query the Central Maine Power website for information.

Usage

See Examples/NoProxy and Examples/Proxy.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMP

type CMP struct {
	Client     *http.Client
	ReqHeaders map[string]string

	MWStatsUrl    string
	PowerStatsUrl string
}

func New

func New(newCMP *CMP) (CMP, error)

func (*CMP) GetCurrentLoad

func (cmp *CMP) GetCurrentLoad() (string, error)

func (*CMP) GetOutageStats

func (cmp *CMP) GetOutageStats() (CMPPowerStats, error)

type CMPPowerStats

type CMPPowerStats struct {
	LastUpdate   time.Time
	Total        string
	WithoutPower string
	Counties     map[string]Outage
	NoOutages    bool
}

type Outage

type Outage struct {
	Total        string
	WithoutPower string
}

Directories

Path Synopsis
Examples

Jump to

Keyboard shortcuts

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