Documentation ¶
Index ¶
- Constants
- Variables
- type BandaiInformation
- type CdInformation
- type Distribution
- type DistributionList
- type ImageUrlList
- type Item
- type ItemComponent
- type ItemInformation
- type ItemList
- type PriceInformation
- type Request
- func (req *Request) Execute() (*Response, error)
- func (req *Request) SetFloor(floor string) *Request
- func (req *Request) SetKeyword(keyword string) *Request
- func (req *Request) SetLength(length int64) *Request
- func (req *Request) SetOffset(offset int64) *Request
- func (req *Request) SetService(service string) *Request
- func (req *Request) SetSite(site string) *Request
- func (req *Request) SetSort(sort string) *Request
- type Response
- type Result
- type SampleImageUrlList
- type SmallSampleList
Constants ¶
View Source
const ( SITE_ALLAGES = "DMM.com" SITE_ADULT = "DMM.co.jp" OPERATION_LIST = "ItemList" DEFAULT_LENGTH = 20 DEFAULT_OFFSET = 1 )
Variables ¶
View Source
var ( API_URL = "http://affiliate-api.dmm.com/" API_VERSION = "2.00" )
Functions ¶
This section is empty.
Types ¶
type BandaiInformation ¶
type BandaiInformation struct {
TitleCode string `xml:"titlecode"`
}
type CdInformation ¶
type CdInformation struct {
Kind string `xml:"kind"`
}
type Distribution ¶
type DistributionList ¶
type DistributionList struct {
Distribution []Distribution `xml:"delivery"`
}
type ImageUrlList ¶
type Item ¶
type Item struct { ServiceName string `xml:"service_name"` FloorName string `xml:"floor_name"` CategoryName string `xml:"category_name"` ContentId string `xml:"content_id"` ProductId string `xml:"product_id"` Title string `xml:"title"` Url string `xml:"URL"` UrlMoble string `xml:"URLsp"` AffiliateUrl string `xml:"affiliateURL"` AffiliateUrlMobile string `xml:"affiliateURLsp"` Date string `xml:"date"` JANCode string `xml:"jancode"` ProductCode string `xml:"maker_product"` ISBN string `xml:"isbn"` Stock string `xml:"stock"` ImageUrl ImageUrlList `xml:"imageURL"` SampleImageUrl SampleImageUrlList `xml:"sampleImageURL"` PriceInformation PriceInformation `xml:"prices"` ItemInformation ItemInformation `xml:"iteminfo"` BandaiInformation BandaiInformation `xml:"bandaiinfo"` CdInformation CdInformation `xml:"cdinfo"` }
type ItemComponent ¶
type ItemInformation ¶
type ItemInformation struct { Maker ItemComponent `xml:"maker"` Label ItemComponent `xml:"label"` Series ItemComponent `xml:"series"` Keywords []ItemComponent `xml:"keyword"` Genres []ItemComponent `xml:"genre"` Actors []ItemComponent `xml:"actor"` Artists []ItemComponent `xml:"artist"` Authors []ItemComponent `xml:"author"` Directors []ItemComponent `xml:"director"` Fighters []ItemComponent `xml:"fighter"` Colors []ItemComponent `xml:"color"` Sizes []ItemComponent `xml:"size"` }
type PriceInformation ¶
type PriceInformation struct { Price string `xml:"price"` PriceAll string `xml:"price_all"` RetailPrice string `xml:"list_price"` Distributions DistributionList `xml:"deliveries"` }
type Request ¶
type Request struct { ApiId string AffiliateId string Operation string Version string Timestamp string Site string Service string Floor string Length int64 Offset int64 Sort string Keyword string }
func New ¶
creates new client Example:
api := New("foobarbazbuzz", "dummy-990") api.SetSite(SITE_ALLAGES) api.SetService("mono") api.SetFloor("dvd") api.SetSort("date") api.SetLength(1) result, err := api.Execute() if err != nil { fmt.Println(err) } else { fmt.Println(result) }
Example:
rst, err := New("foobarbazbuzz", "dummy-999").SetSite(SITE_ADULT).SetLength(1).Execute() if err != nil { fmt.Println(err) } else { fmt.Println(rst) }
func (*Request) SetFloor ¶
set floor parameter see.) https://affiliate.dmm.com/api/reference/com/all/
func (*Request) SetKeyword ¶
set keyword parameter
func (*Request) SetService ¶
set service parameter see.) https://affiliate.dmm.com/api/reference/com/all/
type SampleImageUrlList ¶
type SampleImageUrlList struct {
Sample_s SmallSampleList `xml:"sample_s"`
}
type SmallSampleList ¶
type SmallSampleList struct {
Image []string `xml:"image"`
}
Click to show internal directories.
Click to hide internal directories.