api

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*APIError) Error

func (e *APIError) Error() string

type Budget

type Budget struct {
	Code       string `json:"code"`
	Name       string `json:"name"`
	Average    string `json:"average"`
	BudgetMemo string `json:"budget_memo"`
}

type BudgetMaster

type BudgetMaster struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type BudgetResponse

type BudgetResponse struct {
	Results BudgetResults `json:"results"`
}

type BudgetResults

type BudgetResults struct {
	APIVersion       string         `json:"api_version"`
	ResultsAvailable int            `json:"results_available"`
	ResultsReturned  string         `json:"results_returned"`
	ResultsStart     int            `json:"results_start"`
	Budgets          []BudgetMaster `json:"budget"`
}

type Client

type Client struct {
	BaseURL    string
	APIKey     string
	HTTPClient *http.Client
}

func NewClient

func NewClient(apiKey string) *Client

func (*Client) Get

func (c *Client) Get(path string, params interface{}, out interface{}) error

type CodeName

type CodeName struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type CouponURLs

type CouponURLs struct {
	PC string `json:"pc"`
	SP string `json:"sp"`
}

type CreditCard

type CreditCard struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type CreditCardResponse

type CreditCardResponse struct {
	Results CreditCardResults `json:"results"`
}

type CreditCardResults

type CreditCardResults struct {
	APIVersion       string       `json:"api_version"`
	ResultsAvailable int          `json:"results_available"`
	ResultsReturned  string       `json:"results_returned"`
	ResultsStart     int          `json:"results_start"`
	CreditCards      []CreditCard `json:"credit_card"`
}

type FlexInt

type FlexInt int

FlexInt handles JSON fields that may be int or empty string.

func (*FlexInt) UnmarshalJSON

func (fi *FlexInt) UnmarshalJSON(b []byte) error

type Genre

type Genre struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type GenreParams

type GenreParams struct {
	Code    []string `url:"code,omitempty"`
	Keyword *string  `url:"keyword,omitempty"`
}

GenreParams contains parameters for /genre/v1/

type GenreResponse

type GenreResponse struct {
	Results GenreResults `json:"results"`
}

type GenreResults

type GenreResults struct {
	APIVersion       string  `json:"api_version"`
	ResultsAvailable int     `json:"results_available"`
	ResultsReturned  string  `json:"results_returned"`
	ResultsStart     int     `json:"results_start"`
	Genres           []Genre `json:"genre"`
}

type GourmetResponse

type GourmetResponse struct {
	Results GourmetResults `json:"results"`
}

GourmetResponse is the top-level response from /gourmet/v1/

type GourmetResults

type GourmetResults struct {
	APIVersion       string `json:"api_version"`
	ResultsAvailable int    `json:"results_available"`
	ResultsReturned  string `json:"results_returned"`
	ResultsStart     int    `json:"results_start"`
	Shops            []Shop `json:"shop"`
}

type GourmetSearchParams

type GourmetSearchParams struct {
	ID       []string `url:"id,omitempty"`
	Name     *string  `url:"name,omitempty"`
	NameKana *string  `url:"name_kana,omitempty"`
	NameAny  *string  `url:"name_any,omitempty"`
	Tel      *string  `url:"tel,omitempty"`
	Address  *string  `url:"address,omitempty"`
	Keyword  *string  `url:"keyword,omitempty"`

	// Location
	Lat   *float64 `url:"lat,omitempty"`
	Lng   *float64 `url:"lng,omitempty"`
	Range *int     `url:"range,omitempty"`
	Datum *string  `url:"datum,omitempty"`

	// Area filters
	LargeServiceArea *string  `url:"large_service_area,omitempty"`
	ServiceArea      []string `url:"service_area,omitempty"`
	LargeArea        []string `url:"large_area,omitempty"`
	MiddleArea       []string `url:"middle_area,omitempty"`
	SmallArea        []string `url:"small_area,omitempty"`

	// Category filters
	Genre             []string `url:"genre,omitempty"`
	Budget            []string `url:"budget,omitempty"`
	CreditCardFilter  []string `url:"credit_card,omitempty"`
	Special           []string `url:"special,omitempty"`
	SpecialOr         []string `url:"special_or,omitempty"`
	SpecialCategory   []string `url:"special_category,omitempty"`
	SpecialCategoryOr []string `url:"special_category_or,omitempty"`

	// Capacity
	PartyCapacity *int `url:"party_capacity,omitempty"`

	// Boolean filters (serialized as 0/1)
	WiFi         bool `url:"wifi,int,omitempty"`
	Wedding      bool `url:"wedding,int,omitempty"`
	Course       bool `url:"course,int,omitempty"`
	FreeDrink    bool `url:"free_drink,int,omitempty"`
	FreeFood     bool `url:"free_food,int,omitempty"`
	PrivateRoom  bool `url:"private_room,int,omitempty"`
	Horigotatsu  bool `url:"horigotatsu,int,omitempty"`
	Tatami       bool `url:"tatami,int,omitempty"`
	Cocktail     bool `url:"cocktail,int,omitempty"`
	Shochu       bool `url:"shochu,int,omitempty"`
	Sake         bool `url:"sake,int,omitempty"`
	Wine         bool `url:"wine,int,omitempty"`
	Card         bool `url:"card,int,omitempty"`
	NonSmoking   bool `url:"non_smoking,int,omitempty"`
	Charter      bool `url:"charter,int,omitempty"`
	Ktai         bool `url:"ktai,int,omitempty"`
	Parking      bool `url:"parking,int,omitempty"`
	BarrierFree  bool `url:"barrier_free,int,omitempty"`
	Sommelier    bool `url:"sommelier,int,omitempty"`
	NightView    bool `url:"night_view,int,omitempty"`
	OpenAir      bool `url:"open_air,int,omitempty"`
	Show         bool `url:"show,int,omitempty"`
	Equipment    bool `url:"equipment,int,omitempty"`
	Karaoke      bool `url:"karaoke,int,omitempty"`
	Band         bool `url:"band,int,omitempty"`
	TV           bool `url:"tv,int,omitempty"`
	Lunch        bool `url:"lunch,int,omitempty"`
	Midnight     bool `url:"midnight,int,omitempty"`
	MidnightMeal bool `url:"midnight_meal,int,omitempty"`
	English      bool `url:"english,int,omitempty"`
	Pet          bool `url:"pet,int,omitempty"`
	Child        bool `url:"child,int,omitempty"`
	KtaiCoupon   *int `url:"ktai_coupon,omitempty"`

	// Output control
	Type  *string `url:"type,omitempty"`
	Order *int    `url:"order,omitempty"`
	Start *int    `url:"start,omitempty"`
	Count *int    `url:"count,omitempty"`
}

GourmetSearchParams contains all parameters for /gourmet/v1/

type LargeArea

type LargeArea struct {
	Code             string   `json:"code"`
	Name             string   `json:"name"`
	ServiceArea      CodeName `json:"service_area"`
	LargeServiceArea CodeName `json:"large_service_area"`
}

type LargeAreaParams

type LargeAreaParams struct {
	LargeArea []string `url:"large_area,omitempty"`
	Keyword   *string  `url:"keyword,omitempty"`
}

LargeAreaParams contains parameters for /large_area/v1/

type LargeAreaResponse

type LargeAreaResponse struct {
	Results LargeAreaResults `json:"results"`
}

type LargeAreaResults

type LargeAreaResults struct {
	APIVersion       string      `json:"api_version"`
	ResultsAvailable int         `json:"results_available"`
	ResultsReturned  string      `json:"results_returned"`
	ResultsStart     int         `json:"results_start"`
	LargeAreas       []LargeArea `json:"large_area"`
}

type LargeServiceArea

type LargeServiceArea struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type LargeServiceAreaResponse

type LargeServiceAreaResponse struct {
	Results LargeServiceAreaResults `json:"results"`
}

type LargeServiceAreaResults

type LargeServiceAreaResults struct {
	APIVersion        string             `json:"api_version"`
	ResultsAvailable  int                `json:"results_available"`
	ResultsReturned   string             `json:"results_returned"`
	ResultsStart      int                `json:"results_start"`
	LargeServiceAreas []LargeServiceArea `json:"large_service_area"`
}

type MiddleArea

type MiddleArea struct {
	Code             string   `json:"code"`
	Name             string   `json:"name"`
	LargeArea        CodeName `json:"large_area"`
	ServiceArea      CodeName `json:"service_area"`
	LargeServiceArea CodeName `json:"large_service_area"`
}

type MiddleAreaParams

type MiddleAreaParams struct {
	MiddleArea []string `url:"middle_area,omitempty"`
	LargeArea  []string `url:"large_area,omitempty"`
	Keyword    *string  `url:"keyword,omitempty"`
	Start      *int     `url:"start,omitempty"`
	Count      *int     `url:"count,omitempty"`
}

MiddleAreaParams contains parameters for /middle_area/v1/

type MiddleAreaResponse

type MiddleAreaResponse struct {
	Results MiddleAreaResults `json:"results"`
}

type MiddleAreaResults

type MiddleAreaResults struct {
	APIVersion       string       `json:"api_version"`
	ResultsAvailable int          `json:"results_available"`
	ResultsReturned  string       `json:"results_returned"`
	ResultsStart     int          `json:"results_start"`
	MiddleAreas      []MiddleArea `json:"middle_area"`
}

type Photo

type Photo struct {
	PC     PhotoSizes `json:"pc"`
	Mobile PhotoSizes `json:"mobile"`
}

type PhotoSizes

type PhotoSizes struct {
	L string `json:"l"`
	M string `json:"m"`
	S string `json:"s"`
}

type ServiceArea

type ServiceArea struct {
	Code             string   `json:"code"`
	Name             string   `json:"name"`
	LargeServiceArea CodeName `json:"large_service_area"`
}

type ServiceAreaResponse

type ServiceAreaResponse struct {
	Results ServiceAreaResults `json:"results"`
}

type ServiceAreaResults

type ServiceAreaResults struct {
	APIVersion       string        `json:"api_version"`
	ResultsAvailable int           `json:"results_available"`
	ResultsReturned  string        `json:"results_returned"`
	ResultsStart     int           `json:"results_start"`
	ServiceAreas     []ServiceArea `json:"service_area"`
}

type Shop

type Shop struct {
	ID             string     `json:"id"`
	Name           string     `json:"name"`
	NameKana       string     `json:"name_kana"`
	LogoImage      string     `json:"logo_image"`
	Address        string     `json:"address"`
	StationName    string     `json:"station_name"`
	Lat            float64    `json:"lat"`
	Lng            float64    `json:"lng"`
	Genre          CodeName   `json:"genre"`
	SubGenre       CodeName   `json:"sub_genre"`
	Budget         Budget     `json:"budget"`
	Catch          string     `json:"catch"`
	Capacity       FlexInt    `json:"capacity"`
	Access         string     `json:"access"`
	MobileAccess   string     `json:"mobile_access"`
	URLs           URLs       `json:"urls"`
	Photo          Photo      `json:"photo"`
	Open           string     `json:"open"`
	Close          string     `json:"close"`
	PartyCapacity  FlexInt    `json:"party_capacity"`
	OtherMemo      string     `json:"other_memo"`
	ShopDetailMemo string     `json:"shop_detail_memo"`
	CouponURLs     CouponURLs `json:"coupon_urls"`

	// Area hierarchy
	LargeServiceArea CodeName `json:"large_service_area"`
	ServiceArea      CodeName `json:"service_area"`
	LargeArea        CodeName `json:"large_area"`
	MiddleArea       CodeName `json:"middle_area"`
	SmallArea        CodeName `json:"small_area"`

	// Amenity fields (string values like "あり", "なし")
	WiFi         string  `json:"wifi"`
	Wedding      string  `json:"wedding"`
	Course       string  `json:"course"`
	FreeDrink    string  `json:"free_drink"`
	FreeFood     string  `json:"free_food"`
	PrivateRoom  string  `json:"private_room"`
	Horigotatsu  string  `json:"horigotatsu"`
	Tatami       string  `json:"tatami"`
	Card         string  `json:"card"`
	NonSmoking   string  `json:"non_smoking"`
	Charter      string  `json:"charter"`
	Parking      string  `json:"parking"`
	BarrierFree  string  `json:"barrier_free"`
	Sommelier    string  `json:"sommelier"`
	OpenAir      string  `json:"open_air"`
	Show         string  `json:"show"`
	Equipment    string  `json:"equipment"`
	Karaoke      string  `json:"karaoke"`
	Band         string  `json:"band"`
	TV           string  `json:"tv"`
	English      string  `json:"english"`
	Pet          string  `json:"pet"`
	Child        string  `json:"child"`
	Lunch        string  `json:"lunch"`
	Midnight     string  `json:"midnight"`
	MidnightMeal string  `json:"midnight_meal"`
	Ktai         string  `json:"ktai"`
	KtaiCoupon   FlexInt `json:"ktai_coupon"`
	NightView    string  `json:"night_view"`
	Cocktail     string  `json:"cocktail"`
	Shochu       string  `json:"shochu"`
	Sake         string  `json:"sake"`
	Wine         string  `json:"wine"`
}

type ShopBrief

type ShopBrief struct {
	ID       string   `json:"id"`
	Name     string   `json:"name"`
	NameKana string   `json:"name_kana"`
	Address  string   `json:"address"`
	Genre    CodeName `json:"genre"`
	URLs     URLs     `json:"urls"`
	Desc     string   `json:"desc"`
}

type ShopSearchParams

type ShopSearchParams struct {
	Keyword *string `url:"keyword,omitempty"`
	Tel     *string `url:"tel,omitempty"`
	Start   *int    `url:"start,omitempty"`
	Count   *int    `url:"count,omitempty"`
}

ShopSearchParams contains all parameters for /shop/v1/

type ShopSearchResponse

type ShopSearchResponse struct {
	Results ShopSearchResults `json:"results"`
}

ShopSearchResponse is the response from /shop/v1/

type ShopSearchResults

type ShopSearchResults struct {
	APIVersion       string      `json:"api_version"`
	ResultsAvailable int         `json:"results_available"`
	ResultsReturned  string      `json:"results_returned"`
	ResultsStart     int         `json:"results_start"`
	Shops            []ShopBrief `json:"shop"`
}

type SmallArea

type SmallArea struct {
	Code             string   `json:"code"`
	Name             string   `json:"name"`
	MiddleArea       CodeName `json:"middle_area"`
	LargeArea        CodeName `json:"large_area"`
	ServiceArea      CodeName `json:"service_area"`
	LargeServiceArea CodeName `json:"large_service_area"`
}

type SmallAreaParams

type SmallAreaParams struct {
	SmallArea  []string `url:"small_area,omitempty"`
	MiddleArea []string `url:"middle_area,omitempty"`
	Keyword    *string  `url:"keyword,omitempty"`
	Start      *int     `url:"start,omitempty"`
	Count      *int     `url:"count,omitempty"`
}

SmallAreaParams contains parameters for /small_area/v1/

type SmallAreaResponse

type SmallAreaResponse struct {
	Results SmallAreaResults `json:"results"`
}

type SmallAreaResults

type SmallAreaResults struct {
	APIVersion       string      `json:"api_version"`
	ResultsAvailable int         `json:"results_available"`
	ResultsReturned  string      `json:"results_returned"`
	ResultsStart     int         `json:"results_start"`
	SmallAreas       []SmallArea `json:"small_area"`
}

type Special

type Special struct {
	Code            string   `json:"code"`
	Name            string   `json:"name"`
	SpecialCategory CodeName `json:"special_category"`
}

type SpecialCategory

type SpecialCategory struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

type SpecialCategoryParams

type SpecialCategoryParams struct {
	SpecialCategory []string `url:"special_category,omitempty"`
}

SpecialCategoryParams contains parameters for /special_category/v1/

type SpecialCategoryResponse

type SpecialCategoryResponse struct {
	Results SpecialCategoryResults `json:"results"`
}

type SpecialCategoryResults

type SpecialCategoryResults struct {
	APIVersion        string            `json:"api_version"`
	ResultsAvailable  int               `json:"results_available"`
	ResultsReturned   string            `json:"results_returned"`
	ResultsStart      int               `json:"results_start"`
	SpecialCategories []SpecialCategory `json:"special_category"`
}

type SpecialParams

type SpecialParams struct {
	Special         []string `url:"special,omitempty"`
	SpecialCategory []string `url:"special_category,omitempty"`
}

SpecialParams contains parameters for /special/v1/

type SpecialResponse

type SpecialResponse struct {
	Results SpecialResults `json:"results"`
}

type SpecialResults

type SpecialResults struct {
	APIVersion       string    `json:"api_version"`
	ResultsAvailable int       `json:"results_available"`
	ResultsReturned  string    `json:"results_returned"`
	ResultsStart     int       `json:"results_start"`
	Specials         []Special `json:"special"`
}

type URLs

type URLs struct {
	PC string `json:"pc"`
}

Jump to

Keyboard shortcuts

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