-
Notifications
You must be signed in to change notification settings - Fork 1
/
indicators.go
45 lines (40 loc) · 1.08 KB
/
indicators.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package pulsedive
import (
"net/url"
"strconv"
)
// IndicatorByID implement api Indicators By Indicator ID
func IndicatorByID(id int) ([]byte, error) {
q := url.Values{}
q.Add("schema", schema)
q.Add("iid", strconv.Itoa(id))
q.Add("pretty", pretty)
q.Add("key", apiKey)
return Get(q.Encode(), "/info.php")
}
// IndicatorByValue implement api Indicators By Value
func IndicatorByValue(indicatorValue string) ([]byte, error) {
q := url.Values{}
q.Add("indicator", indicatorValue)
q.Add("pretty", pretty)
q.Add("key", apiKey)
return Get(q.Encode(), "/info.php")
}
// IndicatorLinks implement api Indicators Links
func IndicatorLinks(id int) ([]byte, error) {
q := url.Values{}
q.Add("iid", strconv.Itoa(id))
q.Add("get", "links")
q.Add("pretty", pretty)
q.Add("key", apiKey)
return Get(q.Encode(), "/info.php")
}
// IndicatorProperties implement api Indicators Properties
func IndicatorProperties(id int) ([]byte, error) {
q := url.Values{}
q.Add("iid", strconv.Itoa(id))
q.Add("get", "properties")
q.Add("pretty", pretty)
q.Add("key", apiKey)
return Get(q.Encode(), "/info.php")
}