Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Call(phone string, conversation string) (code int, body string, err error)
- func (c *Client) CancelTask(key string) (code int, body string, err error)
- func (c *Client) CreateCustomTask(title string, desc string, bid float64, expiration time.Time, custom string) (code int, body string, err error)
- func (c *Client) CreateMessage(key string, message string) (code int, body string, err error)
- func (c *Client) CreateTask(title string, desc string, bid float64, expiration time.Time) (code int, body string, err error)
- func (c *Client) Echo(value string) (code int, body string, err error)
- func (c *Client) GetAllTasks() (code int, body string, err error)
- func (c *Client) GetTask(key string) (code int, body string, err error)
- func (c *Client) GetTasksByCursor(cursor string) (code int, body string, err error)
- func (c *Client) GetTasksByStatus(status int) (code int, body string, err error)
Constants ¶
View Source
const ( STATUS_NEW = 1 STATUS_OPEN = 5 STATUS_CLOSED = 20 STATUS_EXPIRED = 21 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewTestClient ¶
Create a test API Client. This will send API calls without actually sending tasks to Fancy Hands assistants.
func (*Client) Call ¶
Create a task for a phone call. The conversation field must be a string formatted as JSON.
func (*Client) CancelTask ¶
Cancel a task based on its key
func (*Client) CreateCustomTask ¶
func (c *Client) CreateCustomTask(title string, desc string, bid float64, expiration time.Time, custom string) (code int, body string, err error)
Create a custom task. The custom field must be a string formatted as JSON.
func (*Client) CreateMessage ¶
Add a message to a specific task based on the task's key.`
func (*Client) CreateTask ¶
func (c *Client) CreateTask(title string, desc string, bid float64, expiration time.Time) (code int, body string, err error)
Create a task. All fields are required.
func (*Client) GetAllTasks ¶
Get all tasks
func (*Client) GetTasksByCursor ¶
Get tasks filtered by cursor. The API may return a cursor for pagination.
Click to show internal directories.
Click to hide internal directories.