-
Notifications
You must be signed in to change notification settings - Fork 4
/
bigmaps.go
44 lines (36 loc) · 1.37 KB
/
bigmaps.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
package api
import "fmt"
// GetBigmapsCount -
func (tzkt *API) GetBigmapsCount() (uint64, error) {
return tzkt.count("/v1/bigmaps/count")
}
// GetBigmaps -
func (tzkt *API) GetBigmaps(filters map[string]string) (response []BigMap, err error) {
err = tzkt.json("/v1/bigmaps", filters, &response)
return
}
// GetBigmapUpdates -
func (tzkt *API) GetBigmapUpdates(filters map[string]string) (response []BigMapUpdate, err error) {
err = tzkt.json("/v1/bigmaps/updates", filters, &response)
return
}
// GetBigmapByID -
func (tzkt *API) GetBigmapByID(id uint64, filters map[string]string) (response BigMap, err error) {
err = tzkt.json(fmt.Sprintf("/v1/bigmaps/%d", id), filters, &response)
return
}
// GetBigmapKeys -
func (tzkt *API) GetBigmapKeys(id uint64, filters map[string]string) (response []BigMapKey, err error) {
err = tzkt.json(fmt.Sprintf("/v1/bigmaps/%d/keys", id), filters, &response)
return
}
// GetBigmapKey -
func (tzkt *API) GetBigmapKey(id uint64, key string, filters map[string]string) (response BigMapKey, err error) {
err = tzkt.json(fmt.Sprintf("/v1/bigmaps/%d/keys/%s", id, key), filters, &response)
return
}
// GetBigmapKeyUpdates -
func (tzkt *API) GetBigmapKeyUpdates(id uint64, key string, filters map[string]string) (response []BigMapUpdate, err error) {
err = tzkt.json(fmt.Sprintf("/v1/bigmaps/%d/keys/%s/updates", id, key), filters, &response)
return
}