File size: 557 Bytes
2c8c8ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
package boosty

import (
	"fmt"
	"net/http"
	"net/url"
)

type Current struct {
	PaidCount      int `json:"paidCount"`
	FollowersCount int `json:"followersCount"`
	Hold           int `json:"hold"`
	Income         int `json:"income"`
	Balance        int `json:"balance"`
	PayoutSum      int `json:"payoutSum"`
}

func (b *Boosty) Current() (*Current, error) {
	u := fmt.Sprintf("/v1/blog/stat/%s/current", b.blog)

	m := Method[Current]{
		request: b.request,
		method:  http.MethodGet,
		url:     u,
		values:  url.Values{},
	}

	return m.Call(Current{})
}