Documentation
¶
Overview ¶
Package youspot is the official Go client for YouSpot, the AI-native personal CRM: the same surface as the youspot npm and PyPI packages.
Everything except CallTool works with no credential. CallTool needs a member's token, because every tool reads one person's own CRM; the sandbox runs the read tools against a demo account with no credential.
Index ¶
- Constants
- type BatchItem
- type Client
- func (c *Client) Ask(ctx context.Context, query string, limit int) (map[string]any, error)
- func (c *Client) Batch(ctx context.Context, items []BatchItem) (map[string]any, error)
- func (c *Client) CallSandboxTool(ctx context.Context, name string, arguments map[string]any) (json.RawMessage, error)
- func (c *Client) CallTool(ctx context.Context, name string, arguments map[string]any) (json.RawMessage, error)
- func (c *Client) Directory(ctx context.Context, limit, page int) (map[string]any, error)
- func (c *Client) Identity(ctx context.Context, identityType string) (map[string]any, error)
- func (c *Client) Index(ctx context.Context) (map[string]any, error)
- func (c *Client) ListDocs(ctx context.Context) (json.RawMessage, error)
- func (c *Client) Member(ctx context.Context, username string) (map[string]any, error)
- func (c *Client) ReadDoc(ctx context.Context, path string) (json.RawMessage, error)
- func (c *Client) ReadMarkdown(ctx context.Context, path string) (string, error)
- func (c *Client) SandboxTools(ctx context.Context) (json.RawMessage, error)
- func (c *Client) SearchDocs(ctx context.Context, query string, limit int) (json.RawMessage, error)
- func (c *Client) Tools(ctx context.Context) (json.RawMessage, error)
- type Error
Constants ¶
const DefaultBaseURL = "https://youspot.com"
DefaultBaseURL is where youspot.com answers; YOUSPOT_BASE_URL overrides it.
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchItem ¶
type BatchItem struct {
ID string `json:"id,omitempty"`
Path string `json:"path"`
Query map[string]string `json:"query,omitempty"`
}
BatchItem is one read inside a Batch call.
type Client ¶
Client talks to one YouSpot origin. The zero value is usable.
func New ¶
func New() *Client
New returns a client for YOUSPOT_BASE_URL (or youspot.com), reading a member token from YOUSPOT_TOKEN when one is set.
func (*Client) Batch ¶
Batch runs up to 20 reads in one round trip; each answer carries its own status and body.
func (*Client) CallSandboxTool ¶
func (c *Client) CallSandboxTool(ctx context.Context, name string, arguments map[string]any) (json.RawMessage, error)
CallSandboxTool runs a read tool against the demo account. No credential.
func (*Client) CallTool ¶
func (c *Client) CallTool(ctx context.Context, name string, arguments map[string]any) (json.RawMessage, error)
CallTool calls one tool on the product MCP server as the member whose token the client holds.
func (*Client) ReadMarkdown ¶
ReadMarkdown reads any public page as markdown, for example "/docs/mcp".
func (*Client) SandboxTools ¶
SandboxTools lists the tools on the sandbox MCP server.
func (*Client) SearchDocs ¶
SearchDocs searches the developer docs over the documentation MCP server.