Documentation ¶
Index ¶
- func PatchHandler(sdk *api.VK, f Middleware) *api.VK
- type Handler
- type Middleware
- type SDKBuilder
- func (builder SDKBuilder) Complete() *api.VK
- func (builder SDKBuilder) WithHTTPClient(client *http.Client) SDKBuilder
- func (builder SDKBuilder) WithMethodURL(url string) SDKBuilder
- func (builder SDKBuilder) WithMiddleware(f Middleware) SDKBuilder
- func (builder SDKBuilder) WithRequestLimit(limit int) SDKBuilder
- func (builder SDKBuilder) WithRequestLimitPerToken(limit int) SDKBuilder
- func (builder SDKBuilder) WithUserAgent(agent string) SDKBuilder
- func (builder SDKBuilder) WithVersion(v string) SDKBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchHandler ¶
func PatchHandler(sdk *api.VK, f Middleware) *api.VK
Types ¶
type Middleware ¶
type SDKBuilder ¶
type SDKBuilder struct {
// contains filtered or unexported fields
}
SDKBuilder represents *api.VK builder.
func BuildSDK ¶
func BuildSDK(token string, tokens ...string) SDKBuilder
BuildSDK creates new SDKBuilder.
func (SDKBuilder) Complete ¶
func (builder SDKBuilder) Complete() *api.VK
Complete returns built API client.
func (SDKBuilder) WithHTTPClient ¶
func (builder SDKBuilder) WithHTTPClient(client *http.Client) SDKBuilder
WithHTTPClient sets HTTP client.
func (SDKBuilder) WithMethodURL ¶
func (builder SDKBuilder) WithMethodURL(url string) SDKBuilder
WithMethodURL sets API endpoint URL.
func (SDKBuilder) WithMiddleware ¶
func (builder SDKBuilder) WithMiddleware(f Middleware) SDKBuilder
WithMiddleware adds Handler middleware.
func (SDKBuilder) WithRequestLimit ¶
func (builder SDKBuilder) WithRequestLimit(limit int) SDKBuilder
WithRequestLimit sets request limit by second.
func (SDKBuilder) WithRequestLimitPerToken ¶
func (builder SDKBuilder) WithRequestLimitPerToken(limit int) SDKBuilder
WithRequestLimitPerToken sets request limit by second per token.
func (SDKBuilder) WithUserAgent ¶
func (builder SDKBuilder) WithUserAgent(agent string) SDKBuilder
WithUserAgent sets User-Agent header.
func (SDKBuilder) WithVersion ¶
func (builder SDKBuilder) WithVersion(v string) SDKBuilder
WithVersion sets API version.
Click to show internal directories.
Click to hide internal directories.