yes24

package
v0.0.0-...-6cf2ef5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadPreviewImages

func DownloadPreviewImages(id string, dir string) error

func NormalizeFilename

func NormalizeFilename(filename string) string

func WriteBookInfo

func WriteBookInfo(info *BookInfo, filename string) error

Types

type BookInfo

type BookInfo struct {
	Title         string
	Isbn          string
	Author        string
	PublishedDate string
	Publisher     string
	Price         string
	PriceCurrency string
}

func GetBookInfo

func GetBookInfo(id string) (*BookInfo, error)

func (*BookInfo) GetPublishedYear

func (s *BookInfo) GetPublishedYear() string

type ExpectsAcceptanceOf

type ExpectsAcceptanceOf struct {
	Type          string `json:"@type"`
	Price         string `json:"price"`
	PriceCurrency string `json:"priceCurrency"`
	Availability  string `json:"availability"`
}

type GoodsInfo

type GoodsInfo struct {
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Genre       string        `json:"genre"`
	Keywords    string        `json:"keywords"`
	Author      NameWithType  `json:"author"`
	Publisher   NameWithType  `json:"publisher"`
	Url         string        `json:"url"`
	WorkExample []WorkExample `json:"workExample"`
}

type NameWithType

type NameWithType struct {
	Type string `json:"@type"`
	Name string `json:"name"`
}

type PagePreview

type PagePreview struct {
	GoodsNo      int32
	OrderNo      int8
	OriginalName string
	SmallImage   PreviewImage
	MiddleImage  PreviewImage
	LargeImage   PreviewImage
	Bookmark     string
}

type PotentialAction

type PotentialAction struct {
	ExpectsAcceptanceOf ExpectsAcceptanceOf `json:"expectsAcceptanceOf"`
}

type PreviewImage

type PreviewImage struct {
	Name     string
	Width    int16
	Height   int16
	FileSize int16
}

type PreviewInput

type PreviewInput struct {
	Pages struct {
		Page []PagePreview `json:"PAGE"`
	}
	PageDomain string `json:"pagedomain"`
	GoodsNo    string `json:"goodsno"`
}

type WorkExample

type WorkExample struct {
	Isbn            string          `json:"isbn"`
	DatePublished   string          `json:"datePublished"`
	PotentialAction PotentialAction `json:"potentialAction"`
}

Jump to

Keyboard shortcuts

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