Documentation
¶
Overview ¶
Package devto provides tools for the DEV Community (dev.to) API.
Public read endpoints work without authentication. Publishing articles requires a DEV_TO_API_KEY environment variable.
Tools exposed:
devto_search — search articles on dev.to devto_article — fetch a single article with full content devto_feed — list latest/top articles, optionally filtered by tag devto_publish — create or update an article (requires API key)
Index ¶
- Constants
- type ArticleTool
- func (t *ArticleTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *ArticleTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *ArticleTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *ArticleTool) Definition() tool.Definition
- func (t *ArticleTool) Description(_ context.Context) (string, error)
- func (t *ArticleTool) FormatResult(data any) string
- func (t *ArticleTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *ArticleTool) IsEnabled() bool
- func (t *ArticleTool) IsReadOnly(_ map[string]any) bool
- func (t *ArticleTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
- type FeedTool
- func (t *FeedTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *FeedTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *FeedTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *FeedTool) Definition() tool.Definition
- func (t *FeedTool) Description(_ context.Context) (string, error)
- func (t *FeedTool) FormatResult(data any) string
- func (t *FeedTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *FeedTool) IsEnabled() bool
- func (t *FeedTool) IsReadOnly(_ map[string]any) bool
- func (t *FeedTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
- type PublishTool
- func (t *PublishTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *PublishTool) Call(ctx context.Context, input tool.CallInput, permissionCheck types.CanUseToolFn) (tool.CallResult, error)
- func (t *PublishTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *PublishTool) Definition() tool.Definition
- func (t *PublishTool) Description(_ context.Context) (string, error)
- func (t *PublishTool) FormatResult(data any) string
- func (t *PublishTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *PublishTool) IsEnabled() bool
- func (t *PublishTool) IsReadOnly(_ map[string]any) bool
- func (t *PublishTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
Constants ¶
View Source
const ( FeedToolName = "devto_feed" FeedDisplayName = "DEV.to Feed" FeedDescription = `` /* 252-byte string literal not displayed */ )
View Source
const ( ArticleToolName = "devto_article" ArticleDisplayName = "DEV.to Article" ArticleDescription = `` /* 261-byte string literal not displayed */ )
View Source
const ( PublishToolName = "devto_publish" PublishDisplayName = "Publish to DEV.to" PublishDescription = `` /* 396-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleTool ¶
type ArticleTool struct{}
func NewArticleTool ¶
func NewArticleTool() *ArticleTool
func (*ArticleTool) BackfillInput ¶
func (*ArticleTool) Call ¶
func (t *ArticleTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
func (*ArticleTool) CheckPermissions ¶
func (t *ArticleTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
func (*ArticleTool) Definition ¶
func (t *ArticleTool) Definition() tool.Definition
func (*ArticleTool) Description ¶
func (t *ArticleTool) Description(_ context.Context) (string, error)
func (*ArticleTool) FormatResult ¶
func (t *ArticleTool) FormatResult(data any) string
func (*ArticleTool) IsConcurrencySafe ¶
func (t *ArticleTool) IsConcurrencySafe(_ map[string]any) bool
func (*ArticleTool) IsEnabled ¶
func (t *ArticleTool) IsEnabled() bool
func (*ArticleTool) IsReadOnly ¶
func (t *ArticleTool) IsReadOnly(_ map[string]any) bool
func (*ArticleTool) ValidateInput ¶
type FeedTool ¶
type FeedTool struct{}
func NewFeedTool ¶
func NewFeedTool() *FeedTool
func (*FeedTool) BackfillInput ¶
func (*FeedTool) Call ¶
func (t *FeedTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
func (*FeedTool) CheckPermissions ¶
func (t *FeedTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
func (*FeedTool) Definition ¶
func (t *FeedTool) Definition() tool.Definition
func (*FeedTool) FormatResult ¶
type PublishTool ¶
type PublishTool struct{}
func NewPublishTool ¶
func NewPublishTool() *PublishTool
func (*PublishTool) BackfillInput ¶
func (*PublishTool) Call ¶
func (t *PublishTool) Call(ctx context.Context, input tool.CallInput, permissionCheck types.CanUseToolFn) (tool.CallResult, error)
func (*PublishTool) CheckPermissions ¶
func (t *PublishTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
func (*PublishTool) Definition ¶
func (t *PublishTool) Definition() tool.Definition
func (*PublishTool) Description ¶
func (t *PublishTool) Description(_ context.Context) (string, error)
func (*PublishTool) FormatResult ¶
func (t *PublishTool) FormatResult(data any) string
func (*PublishTool) IsConcurrencySafe ¶
func (t *PublishTool) IsConcurrencySafe(_ map[string]any) bool
func (*PublishTool) IsEnabled ¶
func (t *PublishTool) IsEnabled() bool
func (*PublishTool) IsReadOnly ¶
func (t *PublishTool) IsReadOnly(_ map[string]any) bool
func (*PublishTool) ValidateInput ¶
Click to show internal directories.
Click to hide internal directories.