-
Notifications
You must be signed in to change notification settings - Fork 1
/
feeds.go
35 lines (31 loc) · 805 Bytes
/
feeds.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
package pulsedive
import (
"net/url"
"strconv"
)
// FeedID implement api Feeds By Feed ID
func FeedID(id int) ([]byte, error) {
q := url.Values{}
q.Add("fid", strconv.Itoa(id))
q.Add("pretty", pretty)
q.Add("key", apiKey)
return Get(q.Encode(), "/info.php")
}
// FeedName implement api Feeds By Feed Name and Organization
func FeedName(name, organization string) ([]byte, error) {
q := url.Values{}
q.Add("feed", name)
q.Add("organization", organization)
q.Add("pretty", pretty)
q.Add("key", apiKey)
return Get(q.Encode(), "/info.php")
}
// FeedLink implement api Feeds Linked Indicators
func FeedLink(id int) ([]byte, error) {
q := url.Values{}
q.Add("fid", strconv.Itoa(id))
q.Add("get", "links")
q.Add("pretty", pretty)
q.Add("key", apiKey)
return Get(q.Encode(), "/info.php")
}