kk

package
v0.0.0-...-23f60af Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const RecipesPath = base.DataPath + "/kk/recipes.json"
View Source
const UsedIDsPath = base.DataPath + "/kk/used.json"

Variables

This section is empty.

Functions

func FetchNewPosts

func FetchNewPosts(
	recipesFilePath string,
	_ func(string, string) ([]byte, error),
	_ func(string, url.Values, string) (data []byte, err error),
	previewOnly bool,
) (base.RecipeBank, error)

Types

type Recipe

type Recipe struct {
	ID            string `json:"id"`
	Title         string `json:"title"`
	Excerpt       string `json:"excerpt"`
	Slug          string `json:"slug"`
	FeaturedImage struct {
		Nodes struct {
			Src string `json:"sourceUrl"`
		} `json:"node"`
	} `json:"featuredImage"`
	Categories struct {
		Nodes []struct {
			Name string `json:"name"`
			Slug string `json:"slug"`
		} `json:"nodes"`
	} `json:"categories"`
}

func (*Recipe) ToPost

func (r *Recipe) ToPost() base.Post

type Response

type Response struct {
	PageProps struct {
		Posts []Recipe `json:"posts"`
	} `json:"pageProps"`
}

Jump to

Keyboard shortcuts

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