api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// DefaultActressAPILength is Default length for a Actress API request
	DefaultActressAPILength = 20
	// DefaultActressMaxLength is MAX length for a Actress API request
	DefaultActressMaxLength = 100
)
View Source
const (
	APIBaseURL       = "https://api.dmm.com/affiliate/v3"
	APIVersion       = "3"
	SiteGeneral      = "DMM.com"
	SiteAdult        = "DMM.R18"
	DefaultAPIOffset = 1
	DefaultAPILength = 100
	DefaultMaxLength = 500
)
View Source
const (
	DefaultProductAPILength = 20
	DefaultProductMaxLength = 100
	DefaultProductMaxOffset = 50000
)

Variables

This section is empty.

Functions

func GetAPIVersion added in v1.0.0

func GetAPIVersion() string

GetAPIVersion returns API version.

GetAPIVersionはAPIのバージョンを返します。

func RequestJSON added in v1.0.0

func RequestJSON(url string) (interface{}, error)

RequestJSON requests a retirived url and returns the response is parsed JSON-encoded data

RequestJSONは指定されたURLにリクエストしJSONで返ってきたレスポンスをパースしたデータを返します。

func TrimString

func TrimString(str string) string

TrimString wraps up strings.TrimString

TrimStringはstrings.TrimStringのラップ関数です。

func ValidateAffiliateID added in v1.0.0

func ValidateAffiliateID(affiliateID string) bool

ValidateAffiliateID validates affiliate ID. (affiliate number range: 990 ~ 999)

e.g. dummy-999

ValidateAffiliateIDはアフィリエイトID(例: dummy-999)のバリデーションを行います。 (アフィリエイトの数値の範囲は 990〜999です)

func ValidateRange

func ValidateRange(target, min, max int64) bool

ValidateRange validates a retrieved number within the range ( number >= min && number <= max).

ValidateRangeは指定された数値が最小値と最大値の範囲内にあるかどうか判定します。

func ValidateSite

func ValidateSite(site string) bool

ValidateSite validates site parameter.

ValidateSiteはsiteパラメータのバリデーションを行います

Types

type Actress

type Actress struct {
	ID          string             `mapstructure:"id"`
	Name        string             `mapstructure:"name"`
	Ruby        string             `mapstructure:"ruby"`
	Bust        string             `mapstructure:"bust"`
	GteBust     string             `mapstructure:"gte_bust"`
	LteBust     string             `mapstructure:"lte_bust"`
	Cup         string             `mapstructure:"cup"`
	Waist       string             `mapstructure:"waist"`
	GteWaist    string             `mapstructure:"gte_waist"`
	LteWaist    string             `mapstructure:"lte_waist"`
	Hip         string             `mapstructure:"hip"`
	GteHip      string             `mapstructure:"gte_hip"`
	LteHip      string             `mapstructure:"lte_hip"`
	Height      string             `mapstructure:"height"`
	GteHeight   string             `mapstructure:"gte_height"`
	LteHeight   string             `mapstructure:"lte_height"`
	Birthday    string             `mapstructure:"birthday"`
	GteBirthday string             `mapstructure:"gte_birthday"`
	LteBirthday string             `mapstructure:"lte_birthday"`
	BloodType   string             `mapstructure:"blood_type"`
	Hobby       string             `mapstructure:"hobby"`
	Prefectures string             `mapstructure:"prefectures"`
	ImageURL    ActressImageList   `mapstructure:"imageURL"`
	ListURL     ActressProductList `mapstructure:"listURL"`
}

type ActressImageList added in v1.0.1

type ActressImageList struct {
	Small string `mapstructure:"small"`
	Large string `mapstructure:"large"`
}

type ActressProductList

type ActressProductList struct {
	Digital string `mapstructure:"digital"`
	Mono    string `mapstructure:"mono"`
	Monthly string `mapstructure:"monthly"`
	Ppm     string `mapstructure:"ppm"`
	Rental  string `mapstructure:"rental"`
}

type ActressRawResponse

type ActressRawResponse struct {
	Request ActressService  `mapstructure:"request"`
	Result  ActressResponse `mapstructure:"result"`
}

type ActressResponse

type ActressResponse struct {
	ResultCount   int64     `mapstructure:"result_count"`
	TotalCount    int64     `mapstructure:"total_count"`
	FirstPosition int64     `mapstructure:"first_position"`
	Actresses     []Actress `mapstructure:"actress"`
}

type ActressService

type ActressService struct {
	ApiID       string `mapstructure:"api_id"`
	AffiliateID string `mapstructure:"affiliate_id"`
	Length      int64  `mapstructure:"hits"`
	Offset      int64  `mapstructure:"offset"`
	Sort        string `mapstructure:"sort"`
	Initial     string `mapstructure:"initial"`
	Keyword     string `mapstructure:"keyword"`
	Bust        string `mapstructure:"bust"`
	GteBust     string `mapstructure:"gte_bust"`
	LteBust     string `mapstructure:"lte_bust"`
	Waist       string `mapstructure:"waist"`
	GteWaist    string `mapstructure:"gte_waist"`
	LteWaist    string `mapstructure:"lte_waist"`
	Hip         string `mapstructure:"hip"`
	GteHip      string `mapstructure:"gte_hip"`
	LteHip      string `mapstructure:"lte_hip"`
	Height      string `mapstructure:"height"`
	GteHeight   string `mapstructure:"gte_height"`
	LteHeight   string `mapstructure:"lte_height"`
	Birthday    string `mapstructure:"birthday"`
	GteBirthday string `mapstructure:"gte_birthday"`
	LteBirthday string `mapstructure:"lte_birthday"`
}

func NewActressService

func NewActressService(affiliateID, apiID string) *ActressService

NewActressService returns a new service for the given affiliate ID and API ID.

NewActressServiceは渡したアフィリエイトIDとAPI IDを使用して新しい serviceを返します。

func (*ActressService) BuildRequestURL added in v1.0.0

func (srv *ActressService) BuildRequestURL() (string, error)

BuildRequestURL creates url to request actress API.

BuildRequestURLは女優検索APIにリクエストするためのURLを作成します。

func (*ActressService) Execute

func (srv *ActressService) Execute() (*ActressResponse, error)

Execute requests a url is created by BuildRequestURL. Use ExecuteWeak If you want get this response in interface{}.

BuildRequestURLで生成したURLにリクエストします。 もし interface{} でこのレスポンスを取得したい場合は ExecuteWeak を使用してください。

func (*ActressService) ExecuteWeak

func (srv *ActressService) ExecuteWeak() (interface{}, error)

ExecuteWeak requests a url is created by BuildRequestURL.

BuildRequestURLで生成したURLにリクエストします。

func (*ActressService) SetBirthday

func (srv *ActressService) SetBirthday(birthday string) *ActressService

SetBirthday sets the specified argument to ActressService.Birthday.

format YYYYMMDD
e.g. 1999/01/01 -> 19990101

SetBirthdayはBirthdayパラメータに女優の誕生日を設定します。

func (*ActressService) SetBust

func (srv *ActressService) SetBust(bust string) *ActressService

SetBust sets the specified argument (numeric format string) to ActressService.Bust. unit: centimeter.

SetBustはBustパラメータに女優のバストサイズを設定します。

func (*ActressService) SetGteBirthday added in v1.0.1

func (srv *ActressService) SetGteBirthday(gteBirthday string) *ActressService

SetGteBirthday sets the specified argument to ActressService.GteBirthday.

format YYYYMMDD
e.g. 19990101

SetGteBirthdayはBirthdayパラメータに女優の誕生日の開始値を設定します。

func (*ActressService) SetGteBust added in v1.0.1

func (srv *ActressService) SetGteBust(gteBust string) *ActressService

SetGteBust sets the specified argument (numeric format string) to ActressService.GteBust. unit: centimeter.

SetGteBustはBustパラメータに女優のバストサイズの最小値を設定します。

func (*ActressService) SetGteHeight added in v1.0.1

func (srv *ActressService) SetGteHeight(gteHeight string) *ActressService

SetGteHeight sets the specified argument (numeric format string) to ActressService.GteHeight. unit: centimeter.

SetGteHeightはBirthdayパラメータに女優の身長の最小値を設定します。

func (*ActressService) SetGteHip added in v1.0.1

func (srv *ActressService) SetGteHip(gteHip string) *ActressService

SetGteHip sets the specified argument (numeric format string) to ActressService.GteHip. unit: centimeter.

SetGteHipはBirthdayパラメータに女優のヒップサイズの最長値を設定します。

func (*ActressService) SetGteWaist added in v1.0.1

func (srv *ActressService) SetGteWaist(gteWaist string) *ActressService

SetGteWaist sets the specified argument (numeric format string) to ActressService.GteWaist. unit: centimeter.

SetGteWaistはBirthdayパラメータに女優のウエストサイズ最小値を設定します。

func (*ActressService) SetHeight

func (srv *ActressService) SetHeight(height string) *ActressService

SetHeight sets the specified argument (numeric format string) to ActressService.Height. unit: centimeter.

SetHeightはBirthdayパラメータに女優の身長を設定します。

func (*ActressService) SetHip

func (srv *ActressService) SetHip(hip string) *ActressService

SetHip sets the specified argument (numeric format string) to ActressService.Hip. unit: centimeter.

SetHipはBirthdayパラメータに女優のヒップサイズを設定します。

func (*ActressService) SetHits

func (srv *ActressService) SetHits(length int64) *ActressService

SetHits set the specified argument to ProductService.Length

SetHits is the alias for SetLength

SetHitsはLengthパラメータを設定します。

func (*ActressService) SetInitial

func (srv *ActressService) SetInitial(initial string) *ActressService

SetInitial sets the specified argument to ActressService.Initial. This argment is actress name's initial and you can use only hiragana.

e.g. srv.SetInitial("あ") -> Sora Aoi(あおい そら, 蒼井そら)

SetInitialはInitalパラメータに検索したい女優の頭文字をひらがなで設定します。

func (*ActressService) SetKeyword

func (srv *ActressService) SetKeyword(keyword string) *ActressService

SetKeyword set the specified argument to ActressService.Keyword

SetKeywordはKeywordパラメータを設定します。

func (*ActressService) SetLength

func (srv *ActressService) SetLength(length int64) *ActressService

SetLength set the specified argument to ProductService.Length

SetLengthはLengthパラメータを設定します。

func (*ActressService) SetLteBirthday added in v1.0.1

func (srv *ActressService) SetLteBirthday(lteBirthday string) *ActressService

SetLteBirthday sets the specified argument to ActressService.LteBirthday.

format YYYYMMDD
e.g. 20171231

SetLteBirthdayはBirthdayパラメータに女優の誕生日の終了値を設定します。

func (*ActressService) SetLteBust added in v1.0.1

func (srv *ActressService) SetLteBust(lteBust string) *ActressService

SetLteBust sets the specified argument (numeric format string) to ActressService.Bust. unit: centimeter.

SetLteBustはBustパラメータに女優のバストサイズの最小値を設定します。

func (*ActressService) SetLteHeight added in v1.0.1

func (srv *ActressService) SetLteHeight(lteHeight string) *ActressService

SetLteHeight sets the specified argument (numeric format string) to ActressService.Height. unit: centimeter.

SetLteHeightはBirthdayパラメータに女優の身長の最大値を設定します。

func (*ActressService) SetLteHip added in v1.0.1

func (srv *ActressService) SetLteHip(lteHip string) *ActressService

SetLteHip sets the specified argument (numeric format string) to ActressService.LteHip. unit: centimeter.

SetLteHipはBirthdayパラメータに女優のヒップサイズの最大値を設定します。

func (*ActressService) SetLteWaist added in v1.0.1

func (srv *ActressService) SetLteWaist(lteWaist string) *ActressService

SetLteWaist sets the specified argument (numeric format string) to ActressService.LteWaist. unit: centimeter.

SetLteWaistはBirthdayパラメータに女優のウエストサイズ最大値を設定します。

func (*ActressService) SetOffset

func (srv *ActressService) SetOffset(offset int64) *ActressService

SetOffset set the specified argument to ProductService.Offset

SetOffsetはOffsetパラメータを設定します。

func (*ActressService) SetSort

func (srv *ActressService) SetSort(sort string) *ActressService

SetSort set the specified argument to ActressService.Sort

SetSortはsortパラメータを設定します。

func (*ActressService) SetWaist

func (srv *ActressService) SetWaist(waist string) *ActressService

SetWaist sets the specified argument (numeric format string) to ActressService.Waist. unit: centimeter.

SetWaistはBirthdayパラメータに女優のウエストサイズを設定します。

func (*ActressService) ValidateLength

func (srv *ActressService) ValidateLength() bool

ValidateLength validates ProductService.Length within the range (1 <= value <= DEFAULT_ACTRESS_MAX_LENGTH). Refer to ValidateRange for more information about the range to validate.

ValidateLengthはProductService.Lengthが範囲内(1 <= value <= DEFAULT_ACTRESS_MAX_LENGTH)にあるか検証します。 検証範囲について更に詳しく知りたい方はValidateRangeを参照してください。

func (*ActressService) ValidateOffset

func (srv *ActressService) ValidateOffset() bool

ValidateOffset validates ActressService.Offset within the range (1 <= value).

ValidateOffsetはActressService.Offsetが範囲内(1 <= value)にあるか検証します。

type Author

type Author struct {
	AuthorID string `mapstructure:"author_id"`
	Name     string `mapstructure:"name"`
	Ruby     string `mapstructure:"ruby"`
	ListURL  string `mapstructure:"list_url"`
}

type AuthorRawResponse

type AuthorRawResponse struct {
	Request AuthorService  `mapstructure:"request"`
	Result  AuthorResponse `mapstructure:"result"`
}

type AuthorResponse

type AuthorResponse struct {
	ResultCount   int64    `mapstructure:"result_count"`
	TotalCount    int64    `mapstructure:"total_count"`
	FirstPosition int64    `mapstructure:"first_position"`
	SiteName      string   `mapstructure:"site_name"`
	SiteCode      string   `mapstructure:"site_code"`
	ServiceName   string   `mapstructure:"service_name"`
	ServiceCode   string   `mapstructure:"service_code"`
	FloorID       string   `mapstructure:"floor_id"`
	FloorName     string   `mapstructure:"floor_name"`
	FloorCode     string   `mapstructure:"floor_code"`
	AuthorList    []Author `mapstructure:"author"`
}

type AuthorService

type AuthorService struct {
	ApiID       string `mapstructure:"api_id"`
	AffiliateID string `mapstructure:"affiliate_id"`
	FloorID     string `mapstructure:"floor_id"`
	Initial     string `mapstructure:"initial"`
	Length      int64  `mapstructure:"hits"`
	Offset      int64  `mapstructure:"offset"`
}

func NewAuthorService

func NewAuthorService(affiliateID, apiID string) *AuthorService

NewAuthorService returns a new service for the given affiliate ID and API ID.

NewAuthorServiceは渡したアフィリエイトIDとAPI IDを使用して新しい serviceを返します。

func (*AuthorService) BuildRequestURL added in v1.0.0

func (srv *AuthorService) BuildRequestURL() (string, error)

BuildRequestURL creates url to request author API.

BuildRequestURLは作者検索APIにリクエストするためのURLを作成します。

func (*AuthorService) Execute

func (srv *AuthorService) Execute() (*AuthorResponse, error)

Execute requests a url is created by BuildRequestURL. Use ExecuteWeak If you want get this response in interface{}.

BuildRequestURLで生成したURLにリクエストします。 もし interface{} でこのレスポンスを取得したい場合は ExecuteWeak を使用してください。

func (*AuthorService) ExecuteWeak

func (srv *AuthorService) ExecuteWeak() (interface{}, error)

ExecuteWeak requests a url is created by BuildRequestURL.

BuildRequestURLで生成したURLにリクエストします。

func (*AuthorService) SetFloorID added in v1.0.0

func (srv *AuthorService) SetFloorID(floorID string) *AuthorService

SetFloorID sets the specified argument to AuthorService.FloorID. You can retrieve Floor IDs from floor API.

SetFloorIDはFloorIDパラメータを設定します。 フロアIDはフロアAPIから取得できます。

func (*AuthorService) SetHits

func (srv *AuthorService) SetHits(length int64) *AuthorService

SetHits sets the specified argument to AuthorService.Length

SetHits is the alias for SetLength

SetHitsはLengthパラメータを設定します。

func (*AuthorService) SetInitial

func (srv *AuthorService) SetInitial(initial string) *AuthorService

SetInitial sets the specified argument to AuthorService.Initial. This argment is author name's initial and you can use only hiragana.

e.g. srv.SetInitial("な") -> Soseki Natsume(なつめ そうせき, 夏目漱石)

SetInitialはInitalパラメータに検索したい作者の頭文字をひらがなで設定します。

func (*AuthorService) SetLength

func (srv *AuthorService) SetLength(length int64) *AuthorService

SetLength set the specified argument to AuthorService.Length

SetLengthはLengthパラメータを設定します。

func (*AuthorService) SetOffset

func (srv *AuthorService) SetOffset(offset int64) *AuthorService

SetOffset sets the specified argument to AuthorService.Offset

SetOffsetはOffsetパラメータを設定します。

func (*AuthorService) ValidateLength

func (srv *AuthorService) ValidateLength() bool

ValidateLength validates AuthorService.Length within the range (1 <= value <= DefaultMaxLength). Refer to ValidateRange for more information about the range to validate.

ValidateLengthはAuthorService.Lengthが範囲内(1 <= value <= DefaultMaxLength)にあるか検証します。 検証範囲について更に詳しく知りたい方はValidateRangeを参照してください。

func (*AuthorService) ValidateOffset

func (srv *AuthorService) ValidateOffset() bool

ValidateOffset validates AuthorService.Offset within the range (1 <= value).

ValidateOffsetはAuthorService.Offsetが範囲内(1 <= value)にあるか検証します。

type BandaiInformation

type BandaiInformation struct {
	TitleCode string `mapstructure:"titlecode"`
}

type CdInformation

type CdInformation struct {
	Kind string `mapstructure:"kind"`
}

type DMMFloor

type DMMFloor struct {
	ID   int64  `mapstructure:"id"`
	Name string `mapstructure:"name"`
	Code string `mapstructure:"code"`
}

type DMMService

type DMMService struct {
	Name   string     `mapstructure:"name"`
	Code   string     `mapstructure:"code"`
	Floors []DMMFloor `mapstructure:"floor"`
}

type Distribution

type Distribution struct {
	Type  string `mapstructure:"type"`
	Price string `mapstructure:"price"`
}

type DistributionList

type DistributionList struct {
	Distribution []Distribution `mapstructure:"delivery"`
}

type FloorRawResponse

type FloorRawResponse struct {
	Request FloorService  `mapstructure:"request"`
	Result  FloorResponse `mapstructure:"result"`
}

type FloorResponse

type FloorResponse struct {
	Site []Site
}

type FloorService

type FloorService struct {
	ApiID       string `mapstructure:"api_id"`
	AffiliateID string `mapstructure:"affiliate_id"`
}

func NewFloorService

func NewFloorService(affiliateID, apiID string) *FloorService

NewFloorService returns a new service for the given affiliate ID and API ID.

NewFloorServiceは渡したアフィリエイトIDとAPI IDを使用して新しい serviceを返します。

func (*FloorService) BuildRequestURL added in v1.0.0

func (srv *FloorService) BuildRequestURL() (string, error)

BuildRequestURL creates url to request floor API.

BuildRequestURLはフロアAPIにリクエストするためのURLを作成します。

func (*FloorService) Execute

func (srv *FloorService) Execute() (*FloorResponse, error)

Execute requests a url is created by BuildRequestURL. Use ExecuteWeak If you want get this response in interface{}.

BuildRequestURLで生成したURLにリクエストします。 もし interface{} でこのレスポンスを取得したい場合は ExecuteWeak を使用してください。

func (*FloorService) ExecuteWeak

func (srv *FloorService) ExecuteWeak() (interface{}, error)

ExecuteWeak requests a url is created by BuildRequestURL.

BuildRequestURLで生成したURLにリクエストします。

type Genre

type Genre struct {
	GenreID string `mapstructure:"genre_id"`
	Name    string `mapstructure:"name"`
	Ruby    string `mapstructure:"ruby"`
	ListURL string `mapstructure:"list_url"`
}

type GenreRawResponse

type GenreRawResponse struct {
	Request GenreService  `mapstructure:"request"`
	Result  GenreResponse `mapstructure:"result"`
}

type GenreResponse

type GenreResponse struct {
	ResultCount   int64   `mapstructure:"result_count"`
	TotalCount    int64   `mapstructure:"total_count"`
	FirstPosition int64   `mapstructure:"first_position"`
	SiteName      string  `mapstructure:"site_name"`
	SiteCode      string  `mapstructure:"site_code"`
	ServiceName   string  `mapstructure:"service_name"`
	ServiceCode   string  `mapstructure:"service_code"`
	FloorID       string  `mapstructure:"floor_id"`
	FloorName     string  `mapstructure:"floor_name"`
	FloorCode     string  `mapstructure:"floor_code"`
	GenreList     []Genre `mapstructure:"genre"`
}

type GenreService

type GenreService struct {
	ApiID       string `mapstructure:"api_id"`
	AffiliateID string `mapstructure:"affiliate_id"`
	FloorID     string `mapstructure:"floor_id"`
	Initial     string `mapstructure:"initial"`
	Length      int64  `mapstructure:"hits"`
	Offset      int64  `mapstructure:"offset"`
}

func NewGenreService

func NewGenreService(affiliateID, apiID string) *GenreService

NewGenreService returns a new service for the given affiliate ID and API ID.

NewGenreServiceは渡したアフィリエイトIDとAPI IDを使用して新しい serviceを返します。

func (*GenreService) BuildRequestURL added in v1.0.0

func (srv *GenreService) BuildRequestURL() (string, error)

BuildRequestURL creates url to request genre API.

BuildRequestURLはジャンル検索APIにリクエストするためのURLを作成します。

func (*GenreService) Execute

func (srv *GenreService) Execute() (*GenreResponse, error)

Execute requests a url is created by BuildRequestURL. Use ExecuteWeak If you want get this response in interface{}.

BuildRequestURLで生成したURLにリクエストします。 もし interface{} でこのレスポンスを取得したい場合は ExecuteWeak を使用してください。

func (*GenreService) ExecuteWeak

func (srv *GenreService) ExecuteWeak() (interface{}, error)

ExecuteWeak requests a url is created by BuildRequestURL.

BuildRequestURLで生成したURLにリクエストします。

func (*GenreService) SetFloorID added in v1.0.0

func (srv *GenreService) SetFloorID(floorID string) *GenreService

SetFloorID sets the specified argument to GenreService.FloorID. You can retrieve Floor IDs from floor API.

SetFloorIDはFloorIDパラメータを設定します。 フロアIDはフロアAPIから取得できます。

func (*GenreService) SetHits

func (srv *GenreService) SetHits(length int64) *GenreService

SetHits set the specified argument to GenreService.Length

SetHits is the alias for SetLength

SetHitsはLengthパラメータを設定します。

func (*GenreService) SetInitial

func (srv *GenreService) SetInitial(initial string) *GenreService

SetInitial sets the specified argument to GenreService.Initial. This argment is author name's initial and you can use only hiragana.

e.g. srv.SetInitial("ろ") -> robot(ろぼっと, ロボット)

SetInitialはInitalパラメータに検索したい作者の頭文字をひらがなで設定します。

func (*GenreService) SetLength

func (srv *GenreService) SetLength(length int64) *GenreService

SetLength set the specified argument to GenreService.Length

SetLengthはLengthパラメータを設定します。

func (*GenreService) SetOffset

func (srv *GenreService) SetOffset(offset int64) *GenreService

SetOffset set the specified argument to GenreService.Offset

SetOffsetはOffsetパラメータを設定します。

func (*GenreService) ValidateLength

func (srv *GenreService) ValidateLength() bool

ValidateLength validates GenreService.Length within the range (1 <= value <= DefaultMaxLength). Refer to ValidateRange for more information about the range to validate.

ValidateLengthはGenreService.Lengthが範囲内(1 <= value <= DefaultMaxLength)にあるか検証します。 検証範囲について更に詳しく知りたい方はValidateRangeを参照してください。

func (*GenreService) ValidateOffset

func (srv *GenreService) ValidateOffset() bool

ValidateOffset validates GenreService.Offset within the range (1 <= value).

ValidateOffsetはGenreService.Offsetが範囲内(1 <= value)にあるか検証します。

type ImageURLList added in v1.0.0

type ImageURLList struct {
	List  string `mapstructure:"list"`
	Small string `mapstructure:"small"`
	Large string `mapstructure:"large"`
}

type Item

type Item struct {
	AffiliateURL       string             `mapstructure:"affiliateURL"`
	AffiliateURLMobile string             `mapstructure:"affiliateURLsp"`
	CategoryName       string             `mapstructure:"category_name"`
	Comment            string             `mapstructure:"comment"`
	ContentID          string             `mapstructure:"content_id"`
	Date               string             `mapstructure:"date"`
	FloorName          string             `mapstructure:"floor_name"`
	FloorCode          string             `mapstructure:"floor_code"`
	ISBN               string             `mapstructure:"isbn"`
	JANCode            string             `mapstructure:"jancode"`
	ProductCode        string             `mapstructure:"maker_product"`
	ProductID          string             `mapstructure:"product_id"`
	ServiceName        string             `mapstructure:"service_name"`
	ServiceCode        string             `mapstructure:"service_code"`
	Stock              string             `mapstructure:"stock"`
	Title              string             `mapstructure:"title"`
	URL                string             `mapstructure:"URL"`
	URLMoble           string             `mapstructure:"URLsp"`
	Volume             string             `mapstructure:"volume"`
	ImageURL           ImageURLList       `mapstructure:"imageURL"`
	SampleImageURL     SampleImageURLList `mapstructure:"sampleImageURL"`
	SampleMovieURL     SampleMovieURLList `mapstructure:"sampleMovieURL"`
	Review             ReviewInformation  `mapstructure:"review"`
	PriceInformation   PriceInformation   `mapstructure:"prices"`
	ItemInformation    ItemInformation    `mapstructure:"iteminfo"`
	BandaiInformation  BandaiInformation  `mapstructure:"bandaiinfo"`
	CdInformation      CdInformation      `mapstructure:"cdinfo"`
}

type ItemComponent

type ItemComponent struct {
	ID   string `mapstructure:"id"`
	Name string `mapstructure:"name"`
}

type ItemInformation

type ItemInformation struct {
	Maker     []ItemComponent `mapstructure:"maker"`
	Label     []ItemComponent `mapstructure:"label"`
	Series    []ItemComponent `mapstructure:"series"`
	Keywords  []ItemComponent `mapstructure:"keyword"`
	Genres    []ItemComponent `mapstructure:"genre"`
	Actors    []ItemComponent `mapstructure:"actor"`
	Artists   []ItemComponent `mapstructure:"artist"`
	Authors   []ItemComponent `mapstructure:"author"`
	Directors []ItemComponent `mapstructure:"director"`
	Fighters  []ItemComponent `mapstructure:"fighter"`
	Colors    []ItemComponent `mapstructure:"color"`
	Sizes     []ItemComponent `mapstructure:"size"`
}

type Maker

type Maker struct {
	MakerID string `mapstructure:"maker_id"`
	Name    string `mapstructure:"name"`
	Ruby    string `mapstructure:"ruby"`
	ListURL string `mapstructure:"list_url"`
}

type MakerRawResponse

type MakerRawResponse struct {
	Request MakerService  `mapstructure:"request"`
	Result  MakerResponse `mapstructure:"result"`
}

type MakerResponse

type MakerResponse struct {
	ResultCount   int64   `mapstructure:"result_count"`
	TotalCount    int64   `mapstructure:"total_count"`
	FirstPosition int64   `mapstructure:"first_position"`
	SiteName      string  `mapstructure:"site_name"`
	SiteCode      string  `mapstructure:"site_code"`
	ServiceName   string  `mapstructure:"service_name"`
	ServiceCode   string  `mapstructure:"service_code"`
	FloorID       string  `mapstructure:"floor_id"`
	FloorName     string  `mapstructure:"floor_name"`
	FloorCode     string  `mapstructure:"floor_code"`
	MakerList     []Maker `mapstructure:"maker"`
}

type MakerService

type MakerService struct {
	ApiID       string `mapstructure:"api_id"`
	AffiliateID string `mapstructure:"affiliate_id"`
	FloorID     string `mapstructure:"floor_id"`
	Initial     string `mapstructure:"initial"`
	Length      int64  `mapstructure:"hits"`
	Offset      int64  `mapstructure:"offset"`
}

func NewMakerService

func NewMakerService(affiliateID, apiID string) *MakerService

NewMakerService returns a new service for the given affiliate ID and API ID.

NewMakerServiceは渡したアフィリエイトIDとAPI IDを使用して新しい serviceを返します。

func (*MakerService) BuildRequestURL added in v1.0.0

func (srv *MakerService) BuildRequestURL() (string, error)

BuildRequestURL creates url to request maker API.

BuildRequestURLはメーカー検索APIにリクエストするためのURLを作成します。

func (*MakerService) Execute

func (srv *MakerService) Execute() (*MakerResponse, error)

Execute requests a url is created by BuildRequestURL. Use ExecuteWeak If you want get this response in interface{}.

BuildRequestURLで生成したURLにリクエストします。 もし interface{} でこのレスポンスを取得したい場合は ExecuteWeak を使用してください。

func (*MakerService) ExecuteWeak

func (srv *MakerService) ExecuteWeak() (interface{}, error)

ExecuteWeak requests a url is created by BuildRequestURL.

BuildRequestURLで生成したURLにリクエストします。

func (*MakerService) SetFloorID added in v1.0.0

func (srv *MakerService) SetFloorID(floorID string) *MakerService

SetFloorID sets the specified argument to MakerService.FloorID. You can retrieve Floor IDs from floor API.

SetFloorIDはFloorIDパラメータを設定します。 フロアIDはフロアAPIから取得できます。

func (*MakerService) SetHits

func (srv *MakerService) SetHits(length int64) *MakerService

SetHits set the specified argument to MakerService.Length

SetHits is the alias for SetLength

SetHitsはLengthパラメータを設定します。

func (*MakerService) SetInitial

func (srv *MakerService) SetInitial(initial string) *MakerService

SetInitial sets the specified argument to MakerService.Initial. This argment is author name's initial and you can use only hiragana.

e.g. srv.SetInitial("ゆ") -> Universal Pictures(ゆにばーさるぴくちゃーず, ユニバーサル・ピクチャーズ)

SetInitialはInitalパラメータに検索したい作者の頭文字をひらがなで設定します。

func (*MakerService) SetLength

func (srv *MakerService) SetLength(length int64) *MakerService

SetLength set the specified argument to MakerService.Length

SetLengthはLengthパラメータを設定します。

func (*MakerService) SetOffset

func (srv *MakerService) SetOffset(offset int64) *MakerService

SetOffset set the specified argument to MakerService.Offset

SetOffsetはOffsetパラメータを設定します。

func (*MakerService) ValidateLength

func (srv *MakerService) ValidateLength() bool

ValidateLength validates MakerService.Length within the range (1 <= value <= DefaultMaxLength). Refer to ValidateRange for more information about the range to validate.

ValidateLengthはMakerService.Lengthが範囲内(1 <= value <= DefaultMaxLength)にあるか検証します。 検証範囲について更に詳しく知りたい方はValidateRangeを参照してください。

func (*MakerService) ValidateOffset

func (srv *MakerService) ValidateOffset() bool

ValidateOffset validates MakerService.Offset within the range (1 <= value).

ValidateOffsetはMakerService.Offsetが範囲内(1 <= value)にあるか検証します。

type PriceInformation

type PriceInformation struct {
	Price         string           `mapstructure:"price"`
	PriceAll      string           `mapstructure:"price_all"`
	RetailPrice   string           `mapstructure:"list_price"`
	Distributions DistributionList `mapstructure:"deliveries"`
}

type ProductRawResponse

type ProductRawResponse struct {
	Request ProductService  `mapstructure:"request"`
	Result  ProductResponse `mapstructure:"result"`
}

type ProductResponse

type ProductResponse struct {
	ResultCount   int64  `mapstructure:"result_count"`
	TotalCount    int64  `mapstructure:"total_count"`
	FirstPosition int64  `mapstructure:"first_position"`
	Items         []Item `mapstructure:"items"`
}

type ProductService

type ProductService struct {
	ApiID       string `mapstructure:"api_id"`
	AffiliateID string `mapstructure:"affiliate_id"`
	Site        string `mapstructure:"site"`
	Service     string `mapstructure:"service"`
	Floor       string `mapstructure:"floor"`
	Length      int64  `mapstructure:"hits"`
	Offset      int64  `mapstructure:"offset"`
	Sort        string `mapstructure:"sort"`
	Keyword     string `mapstructure:"keyword"`
	Article     string `mapstructure:"article"`
	ArticleID   string `mapstructure:"article_id"`
	GteDate     string `mapstructure:"gte_date"`
	LteDate     string `mapstructure:"lte_date"`
	Stock       string `mapstructure:"mono_stock"`
}

func NewProductService

func NewProductService(affiliateID, apiID string) *ProductService

NewProductService returns a new service for the given affiliate ID and API ID.

NewProductServiceは渡したアフィリエイトIDとAPI IDを使用して新しい serviceを返します。

func (*ProductService) BuildRequestURL added in v1.0.0

func (srv *ProductService) BuildRequestURL() (string, error)

BuildRequestURL creates url to request product API.

BuildRequestURLは商品検索APIにリクエストするためのURLを作成します。

func (*ProductService) Execute

func (srv *ProductService) Execute() (*ProductResponse, error)

Execute requests a url is created by BuildRequestURL. Use ExecuteWeak If you want get this response in interface{}.

BuildRequestURLで生成したURLにリクエストします。 もし interface{} でこのレスポンスを取得したい場合は ExecuteWeak を使用してください。

func (*ProductService) ExecuteWeak

func (srv *ProductService) ExecuteWeak() (interface{}, error)

ExecuteWeak requests a url is created by BuildRequestURL.

BuildRequestURLで生成したURLにリクエストします。

func (*ProductService) SetArticle

func (srv *ProductService) SetArticle(stock string) *ProductService

SetArticle set the specified argument to ProductService.Article

SetArticleはArticleパラメータを設定します。

func (*ProductService) SetArticleID added in v1.0.0

func (srv *ProductService) SetArticleID(stock string) *ProductService

SetArticleID set the specified argument to ProductService.ArticleID

SetArticleIDはArticleIDパラメータを設定します。

func (*ProductService) SetFloor

func (srv *ProductService) SetFloor(floor string) *ProductService

SetFloor set the specified argument to ProductService.Floor

SetFloorはFloorパラメータを設定します。

func (*ProductService) SetGteDate added in v1.0.1

func (srv *ProductService) SetGteDate(stock string) *ProductService

SetGteDate set the specified argument to ProductService.GteDate

SetGteDateはGteDateパラメータを設定します。

func (*ProductService) SetHits

func (srv *ProductService) SetHits(length int64) *ProductService

SetHits set the specified argument to ProductService.Length

SetHits is the alias for SetLength

SetHitsはLengthパラメータを設定します。

func (*ProductService) SetKeyword

func (srv *ProductService) SetKeyword(keyword string) *ProductService

SetKeyword set the specified argument to ProductService.Keyword

SetKeywordはKeywordパラメータを設定します。

func (*ProductService) SetLength

func (srv *ProductService) SetLength(length int64) *ProductService

SetLength set the specified argument to ProductService.Length

SetLengthはLengthパラメータを設定します。

func (*ProductService) SetLteDate added in v1.0.1

func (srv *ProductService) SetLteDate(stock string) *ProductService

SetLteDate set the specified argument to ProductService.LteDate

SetLteDateはLteDateパラメータを設定します。

func (*ProductService) SetOffset

func (srv *ProductService) SetOffset(offset int64) *ProductService

SetOffset set the specified argument to ProductService.Offset

SetOffsetはOffsetパラメータを設定します。

func (*ProductService) SetService

func (srv *ProductService) SetService(service string) *ProductService

SetService set the specified argument to ProductService.Service

SetServiceはServiceパラメータを設定します。

func (*ProductService) SetSite

func (srv *ProductService) SetSite(site string) *ProductService

SetSite set the specified argument to ProductService.Site

SetSiteはSiteパラメータを設定します。

func (*ProductService) SetSort

func (srv *ProductService) SetSort(sort string) *ProductService

SetSort set the specified argument to ProductService.Sort

SetSortはSortパラメータを設定します。

func (*ProductService) SetStock

func (srv *ProductService) SetStock(stock string) *ProductService

SetStock set the specified argument to ProductService.Stock

SetStockはStockパラメータを設定します。

func (*ProductService) ValidateLength

func (srv *ProductService) ValidateLength() bool

ValidateLength validates ProductService.Length within the range (1 <= value <= DefaultProductMaxLength). Refer to ValidateRange for more information about the range to validate.

ValidateLengthはProductService.Lengthが範囲内(1 <= value <= DefaultProductMaxLength)にあるか検証します。 検証範囲について更に詳しく知りたい方はValidateRangeを参照してください。

func (*ProductService) ValidateOffset

func (srv *ProductService) ValidateOffset() bool

ValidateOffset validates ProductService.Offset within the range (1 <= value <= DefaultProductMaxOffset). Refer to ValidateRange for more information about the range to validate.

ValidateOffsetはProductService.Offsetが範囲内(1 <= value <= DefaultProductMaxOffset)にあるか検証します。 検証範囲について更に詳しく知りたい方はValidateRangeを参照してください。

type ReviewInformation

type ReviewInformation struct {
	Count   int64   `mapstructure:"count"`
	Average float64 `mapstructure:"average"`
}

type SampleImageURLList added in v1.0.0

type SampleImageURLList struct {
	SampleS SmallSampleList `mapstructure:"sample_s"`
}

type SampleMovieURLList added in v1.0.0

type SampleMovieURLList struct {
	Size476_306 string `mapstructure:"size_476_306"`
	Size560_360 string `mapstructure:"size_560_360"`
	Size644_414 string `mapstructure:"size_644_414"`
	Size720_480 string `mapstructure:"size_720_480"`
	PCFlag      bool   `mapstructure:"pc_flag"`
	SPFlag      bool   `mapstructure:"sp_flag"`
}

type Series

type Series struct {
	SeriesID string `mapstructure:"series_id"`
	Name     string `mapstructure:"name"`
	Ruby     string `mapstructure:"ruby"`
	ListURL  string `mapstructure:"list_url"`
}

type SeriesRawResponse

type SeriesRawResponse struct {
	Request SeriesService  `mapstructure:"request"`
	Result  SeriesResponse `mapstructure:"result"`
}

type SeriesResponse

type SeriesResponse struct {
	ResultCount   int64    `mapstructure:"result_count"`
	TotalCount    int64    `mapstructure:"total_count"`
	FirstPosition int64    `mapstructure:"first_position"`
	SiteName      string   `mapstructure:"site_name"`
	SiteCode      string   `mapstructure:"site_code"`
	ServiceName   string   `mapstructure:"service_name"`
	ServiceCode   string   `mapstructure:"service_code"`
	FloorID       string   `mapstructure:"floor_id"`
	FloorName     string   `mapstructure:"floor_name"`
	FloorCode     string   `mapstructure:"floor_code"`
	SeriesList    []Series `mapstructure:"series"`
}

type SeriesService

type SeriesService struct {
	ApiID       string `mapstructure:"api_id"`
	AffiliateID string `mapstructure:"affiliate_id"`
	FloorID     string `mapstructure:"floor_id"`
	Initial     string `mapstructure:"initial"`
	Length      int64  `mapstructure:"hits"`
	Offset      int64  `mapstructure:"offset"`
}

func NewSeriesService

func NewSeriesService(affiliateID, apiID string) *SeriesService

NewSeriesService returns a new service for the given affiliate ID and API ID.

NewSeriesServiceは渡したアフィリエイトIDとAPI IDを使用して新しい serviceを返します。

func (*SeriesService) BuildRequestURL added in v1.0.0

func (srv *SeriesService) BuildRequestURL() (string, error)

BuildRequestURL creates url to request series API.

BuildRequestURLはシリーズ検索APIにリクエストするためのURLを作成します。

func (*SeriesService) Execute

func (srv *SeriesService) Execute() (*SeriesResponse, error)

Execute requests a url is created by BuildRequestURL. Use ExecuteWeak If you want get this response in interface{}.

BuildRequestURLで生成したURLにリクエストします。 もし interface{} でこのレスポンスを取得したい場合は ExecuteWeak を使用してください。

func (*SeriesService) ExecuteWeak

func (srv *SeriesService) ExecuteWeak() (interface{}, error)

ExecuteWeak requests a url is created by BuildRequestURL.

BuildRequestURLで生成したURLにリクエストします。

func (*SeriesService) SetFloorID added in v1.0.0

func (srv *SeriesService) SetFloorID(floorID string) *SeriesService

SetFloorID sets the specified argument to SeriesService.FloorID. You can retrieve Floor IDs from floor API.

SetFloorIDはFloorIDパラメータを設定します。 フロアIDはフロアAPIから取得できます。

func (*SeriesService) SetHits

func (srv *SeriesService) SetHits(length int64) *SeriesService

SetHits set the specified argument to SeriesService.Length

SetHits is the alias for SetLength

SetHitsはLengthパラメータを設定します。

func (*SeriesService) SetInitial

func (srv *SeriesService) SetInitial(initial string) *SeriesService

SetInitial sets the specified argument to SeriesService.Initial. This argment is series' initial and you can use only hiragana.

e.g. srv.SetInitial("あ") -> ARIA(ありあ)

SetInitialはInitalパラメータに検索したいシリーズの頭文字をひらがなで設定します。

func (*SeriesService) SetLength

func (srv *SeriesService) SetLength(length int64) *SeriesService

SetLength set the specified argument to SeriesService.Length

SetLengthはLengthパラメータを設定します。

func (*SeriesService) SetOffset

func (srv *SeriesService) SetOffset(offset int64) *SeriesService

SetOffset set the specified argument to SeriesService.Offset

SetOffsetはOffsetパラメータを設定します。

func (*SeriesService) ValidateLength

func (srv *SeriesService) ValidateLength() bool

ValidateLength validates SeriesService.Length within the range (1 <= value <= DefaultMaxLength). Refer to ValidateRange for more information about the range to validate.

ValidateLengthはSeriesService.Lengthが範囲内(1 <= value <= DefaultMaxLength)にあるか検証します。 検証範囲について更に詳しく知りたい方はValidateRangeを参照してください。

func (*SeriesService) ValidateOffset

func (srv *SeriesService) ValidateOffset() bool

ValidateOffset validates SeriesService.Offset within the range (1 <= value).

ValidateOffsetはSeriesService.Offsetが範囲内(1 <= value)にあるか検証します。

type Site

type Site struct {
	Name     string       `mapstructure:"name"`
	Code     string       `mapstructure:"code"`
	Services []DMMService `mapstructure:"service"`
}

type SmallSampleList

type SmallSampleList struct {
	Image []string `mapstructure:"image"`
}

Jump to

Keyboard shortcuts

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