Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Corresponds to TimeSeries.Variable.VariableCode[?].Value GageHeightFeet string = "00065" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// Allow the URL to be overridden for testing
BaseURL *url.URL
Client *http.Client
Logger *slog.Logger
}
Client is a type that represents a Waterdata Service client
func (*Client) GetInstantaneousValues ¶
func (c *Client) GetInstantaneousValues(sites []string) (*GetInstantaneousValuesResponse, error)
GetInstantaneousValues is a method that returns values using the InstantaneousValues Service https://waterservices.usgs.gov/nwis/iv/?format=json&sites=12150400&modifiedSince=PT1H&siteStatus=all Constants applied to HTTP requests format=json sites=site1,site2,... modifiedSince=PT1H (ISO 8601 Duration: See https://en.wikipedia.org/wiki/ISO_8601#Durations) siteStatus=all
type SourceInfo ¶
type TimeSeries ¶
type TimeSeries struct {
SourceInfo SourceInfo `json:"sourceInfo"`
Variable Variable `json:"variable"`
Values []TimeSeries_Value `json:"values"`
Name string `json:"name"`
}
type TimeSeries_Value ¶
type TimeSeries_Value struct {
Value []TimeSeries_Value_Value `json:"value"`
}
type TimeSeries_Value_Value ¶
type Value ¶
type Value struct {
QueryInfo QueryInfo `json:"queryInfo"`
TimeSeries []TimeSeries `json:"timeSeries"`
}
type Variable ¶
type Variable struct {
VariableCode []VariableCode `json:"variableCode"`
VariableName string `json:"variableName"`
}
Click to show internal directories.
Click to hide internal directories.