hn

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Comment

type Comment struct {
	Id            int
	Parent        int
	Text          string
	Time          int64
	GoTime        time.Time `json:"-"`
	FetchedTime   int64     `json:"-"`
	FetchedGoTime time.Time `json:"-"`
}

https://hacker-news.firebaseio.com/v0/item/41733646.json

func FetchComment

func FetchComment(ctx context.Context, id int) (*Comment, error)

type Story

type Story struct {
	Id            int
	Kids          []int
	Time          int64
	GoTime        time.Time `json:"-"`
	Title         string
	FetchedTime   int64     `json:"-"`
	FetchedGoTime time.Time `json:"-"`
}

https://hacker-news.firebaseio.com/v0/item/41709301.json

func FetchStory

func FetchStory(ctx context.Context, id int) (*Story, error)

Jump to

Keyboard shortcuts

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