Versions in this module Expand all Collapse all v0 v0.23.0 Apr 3, 2026 v0.22.0 Mar 20, 2026 v0.21.0 Mar 19, 2026 v0.20.0 Mar 10, 2026 Changes in this version + const DefaultHttpUrl + const DefaultTimeout + func EncryptPassword(raw, timestamp string) (encrypted string, err error) + func NewError(httpStatus int, resp *apiResponse) error + type ApiError struct + Code int + HttpStatus int + Message string + TraceID string + func (ae *ApiError) Error() string + type Client struct + func New(opt ...Option) (*Client, error) + func NewFromCfg(c *config.Config) (*Client, error) + func (c *Client) Call(ctx context.Context, method, path string, queryParams interface{}, ...) (err error) + func (c *Client) Delete(ctx context.Context, path string, queryParams interface{}, resp interface{}, ...) error + func (c *Client) Get(ctx context.Context, path string, queryParams url.Values, resp interface{}, ...) error + func (c *Client) GetOTP(ctx context.Context, ropts ...RequestOption) (string, error) + func (c *Client) GetOTPV2(ctx context.Context, ropts ...RequestOption) (string, error) + func (c *Client) Post(ctx context.Context, path string, body interface{}, resp interface{}, ...) error + func (c *Client) Put(ctx context.Context, path string, body interface{}, resp interface{}, ...) error + type Option func(*Options) + func WithAccessToken(accessToken string) Option + func WithAppKey(appKey string) Option + func WithAppSecret(appSecret string) Option + func WithClient(cli *http.Client) Option + func WithLanguage(language openapi.Language) Option + func WithOAuthClient(o *oauth.OAuth) Option + func WithTimeout(timeout time.Duration) Option + func WithURL(url string) Option + type Options struct + AccessToken string + AppKey string + AppSecret string + Client *http.Client + Language openapi.Language + OAuthClient *oauth.OAuth + Timeout time.Duration + URL string + type RequestOption func(*RequestOptions) + func WithBody(v interface{}) RequestOption + func WithHeader(h nhttp.Header) RequestOption + type RequestOptions struct + Header nhttp.Header