libaladin

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 8 Imported by: 0

README

aladin-api

aladin api for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hello

func Hello(name string) string

func SortBooksByID

func SortBooksByID(books []Book)

func SortBooksByISBN

func SortBooksByISBN(books []Book)

func SortBooksByISBN13

func SortBooksByISBN13(books []Book)

func SortBooksByTitle

func SortBooksByTitle(books []Book)

Types

type Book

type Book struct {
	Title              string `json:"title"`
	Link               string `json:"link"`
	Author             string `json:"author"`
	PubDate            string `json:"pubDate"`
	Description        string `json:"description"`
	Isbn               string `json:"isbn"`
	Isbn13             string `json:"isbn13"`
	ItemId             int    `json:"itemId"`
	PriceSales         int    `json:"priceSales"`
	PriceStandard      int    `json:"priceStandard"`
	MallType           string `json:"mallType"`
	StockStatus        string `json:"stockStatus"`
	Mileage            int    `json:"mileage"`
	Cover              string `json:"cover"`
	CategoryId         int    `json:"categoryId"`
	CategoryName       string `json:"categoryName"`
	Publisher          string `json:"publisher"`
	SalesPoint         int    `json:"salesPoint"`
	Adult              bool   `json:"adult"`
	FixedPrice         bool   `json:"fixedPrice"`
	CustomerReviewRank int    `json:"customerReviewRank"`
	AstomerReviewRank  int    `json:"astomerReviewRank"`
	SeriesInfo         struct {
		SeriesId   int    `json:"seriesId"`
		SeriesLink string `json:"seriesLink"`
		SeriesName string `json:"seriesName"`
	} `json:"seriesInfo"`
	SubInfo struct {
		EbookList []interface{} `json:"ebookList"`
		UsedList  struct {
			AladinUsed struct {
				ItemCount int    `json:"itemCount"`
				MinPrice  int    `json:"minPrice"`
				Link      string `json:"link"`
			} `json:"aladinUsed"`
			UserUsed struct {
				ItemCount int    `json:"itemCount"`
				MinPrice  int    `json:"minPrice"`
				Link      string `json:"link"`
			} `json:"userUsed"`
		} `json:"usedList"`
		SubTitle      string `json:"subTitle"`
		OriginalTitle string `json:"originalTitle"`
		ItemPage      int    `json:"itemPage"`
	} `json:"subInfo"`
}

func GetBook

func GetBook(isbn string) Book

func SearchBook

func SearchBook(name string) []Book

func SearchBookAuthor

func SearchBookAuthor(authorname string) []Book

func SearchBookAuthors

func SearchBookAuthors(authorname string, page int) []Book

func SearchBooks

func SearchBooks(name string, page int) []Book

type ItemResult

type ItemResult struct {
	Version            string `json:"version"`
	Title              string `json:"title"`
	Link               string `json:"link"`
	PubDate            string `json:"pubDate"`
	TotalResults       int    `json:"totalResults"`
	StartIndex         int    `json:"startIndex"`
	ItemsPerPage       int    `json:"itemsPerPage"`
	Query              string `json:"query"`
	SearchCategoryId   int    `json:"searchCategoryId"`
	SearchCategoryName string `json:"searchCategoryName"`
	Item               []Book `json:"item"`
}

type SearchResult

type SearchResult struct {
	Version            string `json:"version"`
	Title              string `json:"title"`
	Link               string `json:"link"`
	PubDate            string `json:"pubDate"`
	TotalResults       int    `json:"totalResults"`
	StartIndex         int    `json:"startIndex"`
	ItemsPerPage       int    `json:"itemsPerPage"`
	Query              string `json:"query"`
	SearchCategoryId   int    `json:"searchCategoryId"`
	SearchCategoryName string `json:"searchCategoryName"`
	Item               []Book `json:"item"`
}

Jump to

Keyboard shortcuts

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