Add types
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package pixelapi
|
||||
|
||||
import "fornaxian.tech/pixeldrain_server/api/restapi/apitype"
|
||||
|
||||
// Recaptcha stores the reCaptcha site key
|
||||
type Recaptcha struct {
|
||||
SiteKey string `json:"site_key"`
|
||||
@@ -20,8 +18,13 @@ func (p *PixelAPI) GetMiscViewToken() (resp string, err error) {
|
||||
return resp, p.jsonRequest("GET", "misc/viewtoken", &resp)
|
||||
}
|
||||
|
||||
// SiaPrice is the price of one siacoin
|
||||
type SiaPrice struct {
|
||||
Price float64 `json:"price"`
|
||||
}
|
||||
|
||||
// GetSiaPrice gets the price of one siacoin
|
||||
func (p *PixelAPI) GetSiaPrice() (resp float64, err error) {
|
||||
var sp apitype.SiaPrice
|
||||
var sp SiaPrice
|
||||
return sp.Price, p.jsonRequest("GET", "misc/sia_price", &sp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user