mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-29 21:27:05 +02:00
Code style: All uppercase acronyms URL, ISRC, ID, HTTP
This commit is contained in:
parent
39b31fc664
commit
d51c97c648
26 changed files with 137 additions and 137 deletions
|
@ -36,7 +36,7 @@ const MaxItemsPerGet = 1000
|
|||
const DefaultRateLimitWaitSeconds = 5
|
||||
|
||||
type Client struct {
|
||||
HttpClient *resty.Client
|
||||
HTTPClient *resty.Client
|
||||
token oauth2.TokenSource
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ func NewClient(token oauth2.TokenSource) Client {
|
|||
client.SetHeader("User-Agent", version.UserAgent())
|
||||
client.SetRetryCount(5)
|
||||
return Client{
|
||||
HttpClient: client,
|
||||
HTTPClient: client,
|
||||
token: token,
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ func (c Client) setToken(req *resty.Request) error {
|
|||
}
|
||||
|
||||
func listRequest[T Result](c Client, path string, offset int, limit int) (result T, err error) {
|
||||
request := c.HttpClient.R().
|
||||
request := c.HTTPClient.R().
|
||||
SetQueryParams(map[string]string{
|
||||
"index": strconv.Itoa(offset),
|
||||
"limit": strconv.Itoa(limit),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue