-
Notifications
You must be signed in to change notification settings - Fork 1
/
n2yo.go
28 lines (22 loc) · 686 Bytes
/
n2yo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package n2yo
import (
"net/http"
"time"
"github.com/pkg/errors"
)
const (
DefaultClientTimeout = 30 * time.Second
DefaultMaxTransactionCount = 1000
APIKeyQuery = "apiKey"
)
var (
ErrMaxTransactionCountReached = errors.New("maximum transactions count reached")
)
type N2YOer interface {
GetTLE(id int) (Response, error)
GetPositions(id int, obsLat, obsLang, obsAlt float64, seconds int) (Response, error)
GetVisualPasses(id int, obsLat, obsLang, obsAlt float64, days, minVisibility int) (Response, error)
GetRadioPasses(id int, obsLat, obsLang, obsAlt float64, days, minElevation int) (Response, error)
CustomHTTPClient(cl *http.Client)
SetBaseURL(url string)
}