hn

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheTimeout time.Duration = time.Minute

Functions

func UseHackerNews

func UseHackerNews() *hnclient.Client

func UseStory

func UseStory(id int) (
	story *hnclient.Story,
	loading bool,
	err error,
)

Types

type CurrentStoryState

type CurrentStoryState struct {
	Data    hnclient.Story
	Loading bool
	Error   error
}

func UseCurrentStory

func UseCurrentStory(
	storiesContext *r.Context,
	commentsContext *r.Context,
) (
	CurrentStoryState,
	r.SetState,
)

UseCurrentStory

type TopStoriesState

type TopStoriesState struct {
	Data    []int
	Loading bool
	Error   error
}

func UseTopStories

func UseTopStories() TopStoriesState

UseTopStories

Jump to

Keyboard shortcuts

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