Help us shape the future of Go! Take the 2026 Go Developer Survey

devto

package
v1.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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

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 (t *ArticleTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*ArticleTool) Call

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

func (t *ArticleTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

type FeedTool

type FeedTool struct{}

func NewFeedTool

func NewFeedTool() *FeedTool

func (*FeedTool) BackfillInput

func (t *FeedTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*FeedTool) Call

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) Description

func (t *FeedTool) Description(_ context.Context) (string, error)

func (*FeedTool) FormatResult

func (t *FeedTool) FormatResult(data any) string

func (*FeedTool) IsConcurrencySafe

func (t *FeedTool) IsConcurrencySafe(_ map[string]any) bool

func (*FeedTool) IsEnabled

func (t *FeedTool) IsEnabled() bool

func (*FeedTool) IsReadOnly

func (t *FeedTool) IsReadOnly(_ map[string]any) bool

func (*FeedTool) ValidateInput

func (t *FeedTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

type PublishTool

type PublishTool struct{}

func NewPublishTool

func NewPublishTool() *PublishTool

func (*PublishTool) BackfillInput

func (t *PublishTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

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

func (t *PublishTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL