Documentation ¶
Index ¶
- Variables
- func IsUrl(str string) bool
- type AccessToken
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{}) error
- func (c *Client) DoAppendText(ctx context.Context, conversationId string, ...) error
- func (c *Client) DoFile(ctx context.Context, filePath string, ...) error
- func (c *Client) DoText(ctx context.Context, text asyncinterfaces.AsyncTextRequest, ...) error
- func (c *Client) DoURL(ctx context.Context, ufRequest asyncinterfaces.AsyncURLFileRequest, ...) error
- func (c *Client) SetAuthorization(auth *AccessToken)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidInput required input was not found ErrInvalidInput = errors.New("required input was not found") // ErrInvalidURIExtension couldn't find a period to indicate a file extension ErrInvalidURIExtension = errors.New("couldn't find a period to indicate a file extension") )
Functions ¶
Types ¶
type AccessToken ¶
AccessToken represents a Symbl platform bearer access token with expiry information.
type Client ¶
Client which extends basic client to support REST
func (*Client) DoAppendText ¶
func (c *Client) DoAppendText(ctx context.Context, conversationId string, text asyncinterfaces.AsyncTextRequest, resBody interface{}) error
DoAppendText appends Text to a given conversation ID
func (*Client) DoFile ¶
func (c *Client) DoFile(ctx context.Context, filePath string, ufRequest asyncinterfaces.AsyncURLFileRequest, resBody interface{}) error
DoFile posts a file capturing a conversation to a given REST endpoint
func (*Client) DoText ¶
func (c *Client) DoText(ctx context.Context, text asyncinterfaces.AsyncTextRequest, resBody interface{}) error
DoAppendText initializes Text for a given conversation ID
func (*Client) DoURL ¶
func (c *Client) DoURL(ctx context.Context, ufRequest asyncinterfaces.AsyncURLFileRequest, resBody interface{}) error
DoURL performs a REST call using a URL conversation source
func (*Client) SetAuthorization ¶
func (c *Client) SetAuthorization(auth *AccessToken)
SetAuthorization sets an authorization token to make API calls to a given platform
Click to show internal directories.
Click to hide internal directories.