fetcher

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ITEM_URL_BASE = "https://hacker-news.firebaseio.com/v0/item"

Variables

View Source
var FetchURL = func(itemId int64) (string, error) {
	return fmt.Sprintf("%s/%d.json", ITEM_URL_BASE, itemId), nil
}

FetchURL is a variable that holds the function to construct the URL

Functions

func Fetch

func Fetch(itemId int64) (models.Posting, error)

Fetch retrieves a posting from the Hacker News API by its ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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