From 0593eb55c29cbbdbc7b794ec1a3c02c960ef2698 Mon Sep 17 00:00:00 2001 From: Suvorov Daniil Date: Wed, 12 Jan 2022 00:14:07 +0300 Subject: [PATCH] feat: VK.DefaultHandler make public --- api/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/api.go b/api/api.go index 56da7784..f94d3177 100644 --- a/api/api.go +++ b/api/api.go @@ -121,7 +121,7 @@ func NewVK(tokens ...string) *VK { vk.accessTokens = tokens vk.Version = Version - vk.Handler = vk.defaultHandler + vk.Handler = vk.DefaultHandler vk.MethodURL = MethodURL vk.Client = http.DefaultClient @@ -207,8 +207,8 @@ func buildQuery(sliceParams ...Params) (context.Context, url.Values) { return ctx, query } -// defaultHandler provides access to VK API methods. -func (vk *VK) defaultHandler(method string, sliceParams ...Params) (Response, error) { +// DefaultHandler provides access to VK API methods. +func (vk *VK) DefaultHandler(method string, sliceParams ...Params) (Response, error) { u := vk.MethodURL + method ctx, query := buildQuery(sliceParams...) attempt := 0