devto

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article added in v0.51.0

type Article struct {
	Title string `json:"title"`
	URL   string `json:"url"`
	User  struct {
		Username string `json:"username"`
	} `json:"user"`
}

Article represents a DEV.to article from the public API.

type Client added in v0.51.0

type Client struct {
	// contains filtered or unexported fields
}

Client fetches articles from the DEV.to API.

func NewClient added in v0.51.0

func NewClient(httpClient *http.Client, baseURL string) *Client

NewClient creates a Client. Pass nil for httpClient to use http.DefaultClient. baseURL overrides the API endpoint (useful for testing); pass "" for the default.

func (*Client) FetchArticles added in v0.51.0

func (c *Client) FetchArticles(ctx context.Context, tag, username, state string, perPage int) ([]Article, error)

FetchArticles retrieves articles matching the given filters.

type Settings

type Settings struct {
	*cfg.Common
	// contains filtered or unexported fields
}

Settings defines the configuration options for this module

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, yamlConfig *config.Config, globalConfig *config.Config) *Settings

NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated

type Widget

type Widget struct {
	view.ScrollableWidget
	// contains filtered or unexported fields
}

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, pages *tview.Pages, settings *Settings) *Widget

func (*Widget) ConfigText added in v0.50.0

func (widget *Widget) ConfigText() string

func (*Widget) Refresh

func (widget *Widget) Refresh()

func (*Widget) Render

func (widget *Widget) Render()

Render sets up the widget data for redrawing to the screen

Jump to

Keyboard shortcuts

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