Documentation ¶
Overview ¶
Package fddb implements part of the API of http://fddb.info
Index ¶
Constants ¶
View Source
const ROOT_URL = "http://fddb.info/api/v13"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) DiaryGetDay ¶
func (c *Client) DiaryGetDay(day time.Time) (DiaryResult, error)
func (*Client) SearchItem ¶
func (c *Client) SearchItem(query string) (SearchResult, error)
func (*Client) SetLoginInfo ¶
type Description ¶
type Description struct { Name string `xml:"name"` Option string `xml:"option"` Producer string `xml:"producer"` Group string `xml:"group"` ImageDescription string `xml:"imagedescription"` }
func (Description) FullName ¶
func (d Description) FullName() string
type DiaryElement ¶
type DiaryElement struct { Uid int `xml:"diary_uid"` Date int64 `xml:"diary_date"` Type int `xml:"diary_type"` Item DiaryShortItem `xml:"diaryshortitem"` }
type DiaryItemData ¶
type DiaryResult ¶
type DiaryResult struct {
DiaryElements []DiaryElement `xml:"diaryelement"`
}
type DiaryShortItem ¶
type DiaryShortItem struct { Id int `xml:"itemid"` Data DiaryItemData `xml:"data"` Description Description `xml:"description"` }
type Item ¶
type Item struct { Id int `xml:"id"` ThumbSrc string `xml:"thumbsrc"` ThumbSrcLarge string `xml:"thumbsrclarge"` FoodRank float64 `xml:"foodrank"` ProducerId int `xml:"producerid"` GroupId int `xml:"groupid"` ProductcodeEAN string `xml:"productcode_ean"` Data ItemData `xml:"data"` Servings []Serving `xml:"servings>serving"` Description Description `xml:"description"` }
type ItemData ¶
type ItemData struct { Amount float64 `xml:"amount"` AmountMeasuringSystem string `xml:"amount_measuring_system"` AggregateState string `xml:"aggregate_state"` KJ float64 `xml:"kj"` KCal float64 `xml:"kcal"` FatGram float64 `xml:"fat_gram"` FatSatGram float64 `xml:"fat_sat_gram"` KhGram float64 `xml:"kh_gram"` SugarGram float64 `xml:"sugar_gram"` ProteinGram float64 `xml:"protein_gram"` DfGram float64 `xml:"df_gram"` }
type SearchResult ¶
type SearchResult struct {
Items []Item `xml:"items>item"`
}
Click to show internal directories.
Click to hide internal directories.