Documentation
¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AdminUserGenAPIKeyParams
- type AdminUserGenAPIKeyResponse
- type AdminUserGenAPIKeyResponseData
- type AdminUserRevokeAPIKeyParams
- type AdminUserRevokeAPIKeyResponse
- type AdminUserRevokeAPIKeyResponseData
- type AdminUserRevokeAPIKeyResponseDataUnion
- type AdminUserService
- type AuthExchangeFeishuCodeParams
- type AuthExchangeFeishuCodeResponse
- type AuthExchangeFeishuCodeResponseData
- type AuthExchangeFeishuCodeResponseDataUser
- type AuthService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Collection
- type CollectionDataArray
- type CollectionDataMap
- type CollectionDataUnion
- type CollectionDeleteParams
- type CollectionDeleteResponse
- type CollectionGetParams
- type CollectionGetResponse
- type CollectionListParams
- type CollectionListParamsKind
- type CollectionNewParams
- type CollectionNewParamsDataArray
- type CollectionNewParamsDataMap
- type CollectionNewParamsDataUnion
- type CollectionNewParamsKind
- type CollectionNewResponse
- type CollectionNewResponseData
- type CollectionPublishParams
- type CollectionPublishResponse
- type CollectionRelationByPackIDParams
- type CollectionRelationByPackIDResponse
- type CollectionRelationByPackIDSearchParams
- type CollectionRelationByPackIDSearchResponse
- type CollectionRelationByUuidParams
- type CollectionRelationByUuidResponse
- type CollectionRelationByUuidSearchParams
- type CollectionRelationByUuidSearchResponse
- type CollectionSearchParams
- type CollectionSearchParamsKind
- type CollectionSearchParamsOrder
- type CollectionService
- func (r *CollectionService) Delete(ctx context.Context, params CollectionDeleteParams, ...) (res *CollectionDeleteResponse, err error)
- func (r *CollectionService) Get(ctx context.Context, params CollectionGetParams, opts ...option.RequestOption) (res *CollectionGetResponse, err error)
- func (r *CollectionService) List(ctx context.Context, params CollectionListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[shared.Collection], err error)
- func (r *CollectionService) ListAutoPaging(ctx context.Context, params CollectionListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[shared.Collection]
- func (r *CollectionService) New(ctx context.Context, params CollectionNewParams, opts ...option.RequestOption) (res *CollectionNewResponse, err error)
- func (r *CollectionService) Publish(ctx context.Context, params CollectionPublishParams, ...) (res *CollectionPublishResponse, err error)
- func (r *CollectionService) RelationByPackID(ctx context.Context, params CollectionRelationByPackIDParams, ...) (res *CollectionRelationByPackIDResponse, err error)
- func (r *CollectionService) RelationByPackIDSearch(ctx context.Context, params CollectionRelationByPackIDSearchParams, ...) (res *CollectionRelationByPackIDSearchResponse, err error)
- func (r *CollectionService) RelationByUuid(ctx context.Context, params CollectionRelationByUuidParams, ...) (res *CollectionRelationByUuidResponse, err error)
- func (r *CollectionService) RelationByUuidSearch(ctx context.Context, params CollectionRelationByUuidSearchParams, ...) (res *CollectionRelationByUuidSearchResponse, err error)
- func (r *CollectionService) Search(ctx context.Context, params CollectionSearchParams, ...) (res *pagination.PageNumberPagination[shared.Collection], err error)
- func (r *CollectionService) SearchAutoPaging(ctx context.Context, params CollectionSearchParams, ...) *pagination.PageNumberPaginationAutoPager[shared.Collection]
- func (r *CollectionService) Update(ctx context.Context, params CollectionUpdateParams, ...) (res *CollectionUpdateResponse, err error)
- type CollectionUpdateParams
- type CollectionUpdateParamsDataArray
- type CollectionUpdateParamsDataMap
- type CollectionUpdateParamsDataUnion
- type CollectionUpdateParamsKind
- type CollectionUpdateResponse
- type Error
- type GameDeleteParams
- type GameDeleteResponse
- type GameGetParams
- type GameGetResponse
- type GameGetResponseData
- type GameGetResponseDataGameConfigArray
- type GameGetResponseDataGameConfigMap
- type GameGetResponseDataGameConfigUnion
- type GameGetResponseDataGameExtendArray
- type GameGetResponseDataGameExtendMap
- type GameGetResponseDataGameExtendUnion
- type GameGetResponseDataKind
- type GameLanguage
- type GameLanguageParam
- type GameListParams
- type GameListResponse
- type GameListResponseGameConfigArray
- type GameListResponseGameConfigMap
- type GameListResponseGameConfigUnion
- type GameListResponseGameExtendArray
- type GameListResponseGameExtendMap
- type GameListResponseGameExtendUnion
- type GameListResponseKind
- type GameNewParams
- type GameNewParamsGameConfigArray
- type GameNewParamsGameConfigMap
- type GameNewParamsGameConfigUnion
- type GameNewParamsGameExtendArray
- type GameNewParamsGameExtendMap
- type GameNewParamsGameExtendUnion
- type GameNewParamsKind
- type GameNewResponse
- type GameNewResponseData
- type GameService
- func (r *GameService) Delete(ctx context.Context, params GameDeleteParams, opts ...option.RequestOption) (res *GameDeleteResponse, err error)
- func (r *GameService) Get(ctx context.Context, params GameGetParams, opts ...option.RequestOption) (res *GameGetResponse, err error)
- func (r *GameService) List(ctx context.Context, params GameListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[GameListResponse], err error)
- func (r *GameService) ListAutoPaging(ctx context.Context, params GameListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[GameListResponse]
- func (r *GameService) New(ctx context.Context, params GameNewParams, opts ...option.RequestOption) (res *GameNewResponse, err error)
- func (r *GameService) Update(ctx context.Context, params GameUpdateParams, opts ...option.RequestOption) (res *GameUpdateResponse, err error)
- type GameUpdateParams
- type GameUpdateParamsGameConfigArray
- type GameUpdateParamsGameConfigMap
- type GameUpdateParamsGameConfigUnion
- type GameUpdateParamsGameExtendArray
- type GameUpdateParamsGameExtendMap
- type GameUpdateParamsGameExtendUnion
- type GameUpdateParamsKind
- type GameUpdateResponse
- type I18n
- type I18nImage
- type I18nImageKind
- type I18nImageParam
- type I18nLanguage
- type I18nParam
- type ProductSKUDeleteParams
- type ProductSKUDeleteResponse
- type ProductSKUGetManyParams
- type ProductSKUGetManyResponse
- type ProductSKUGetManySearchParams
- type ProductSKUGetManySearchResponse
- type ProductSKUGetParams
- type ProductSKUGetResponse
- type ProductSKUListParams
- type ProductSKUListParamsKind
- type ProductSKUMergeParams
- type ProductSKUMergeParamsMergeDataMergeDataArray
- type ProductSKUMergeParamsMergeDataMergeDataObject
- type ProductSKUMergeParamsMergeDataUnion
- type ProductSKUMergeRelationParams
- type ProductSKUMergeRelationResponse
- type ProductSKUMergeRelationResponseData
- type ProductSKUMergeResponse
- type ProductSKUNewParams
- type ProductSKUNewParamsDataArray
- type ProductSKUNewParamsDataMap
- type ProductSKUNewParamsDataUnion
- type ProductSKUNewResponse
- type ProductSKUNewResponseData
- type ProductSKUPublishParams
- type ProductSKUPublishResponse
- type ProductSKURelationByCvidParams
- type ProductSKURelationByCvidResponse
- type ProductSKURelationByCvidSearchParams
- type ProductSKURelationByCvidSearchResponse
- type ProductSKURelationByUuidParams
- type ProductSKURelationByUuidResponse
- type ProductSKURelationByUuidSearchParams
- type ProductSKURelationByUuidSearchResponse
- type ProductSKUSearchParams
- type ProductSKUSearchParamsKind
- type ProductSKUSearchParamsOrder
- type ProductSKUService
- func (r *ProductSKUService) Delete(ctx context.Context, params ProductSKUDeleteParams, ...) (res *ProductSKUDeleteResponse, err error)
- func (r *ProductSKUService) Get(ctx context.Context, params ProductSKUGetParams, opts ...option.RequestOption) (res *ProductSKUGetResponse, err error)
- func (r *ProductSKUService) GetMany(ctx context.Context, params ProductSKUGetManyParams, ...) (res *ProductSKUGetManyResponse, err error)
- func (r *ProductSKUService) GetManySearch(ctx context.Context, params ProductSKUGetManySearchParams, ...) (res *ProductSKUGetManySearchResponse, err error)
- func (r *ProductSKUService) List(ctx context.Context, params ProductSKUListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[SKU], err error)
- func (r *ProductSKUService) ListAutoPaging(ctx context.Context, params ProductSKUListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[SKU]
- func (r *ProductSKUService) Merge(ctx context.Context, params ProductSKUMergeParams, ...) (res *ProductSKUMergeResponse, err error)
- func (r *ProductSKUService) MergeRelation(ctx context.Context, params ProductSKUMergeRelationParams, ...) (res *ProductSKUMergeRelationResponse, err error)
- func (r *ProductSKUService) New(ctx context.Context, params ProductSKUNewParams, opts ...option.RequestOption) (res *ProductSKUNewResponse, err error)
- func (r *ProductSKUService) Publish(ctx context.Context, params ProductSKUPublishParams, ...) (res *ProductSKUPublishResponse, err error)
- func (r *ProductSKUService) RelationByCvid(ctx context.Context, params ProductSKURelationByCvidParams, ...) (res *ProductSKURelationByCvidResponse, err error)
- func (r *ProductSKUService) RelationByCvidSearch(ctx context.Context, params ProductSKURelationByCvidSearchParams, ...) (res *ProductSKURelationByCvidSearchResponse, err error)
- func (r *ProductSKUService) RelationByUuid(ctx context.Context, params ProductSKURelationByUuidParams, ...) (res *ProductSKURelationByUuidResponse, err error)
- func (r *ProductSKUService) RelationByUuidSearch(ctx context.Context, params ProductSKURelationByUuidSearchParams, ...) (res *ProductSKURelationByUuidSearchResponse, err error)
- func (r *ProductSKUService) Search(ctx context.Context, params ProductSKUSearchParams, ...) (res *pagination.PageNumberPagination[SKU], err error)
- func (r *ProductSKUService) SearchAutoPaging(ctx context.Context, params ProductSKUSearchParams, ...) *pagination.PageNumberPaginationAutoPager[SKU]
- func (r *ProductSKUService) Update(ctx context.Context, params ProductSKUUpdateParams, ...) (res *ProductSKUUpdateResponse, err error)
- func (r *ProductSKUService) UpdateImages(ctx context.Context, params ProductSKUUpdateImagesParams, ...) (res *ProductSKUUpdateImagesResponse, err error)
- func (r *ProductSKUService) UpdateName(ctx context.Context, params ProductSKUUpdateNameParams, ...) (res *ProductSKUUpdateNameResponse, err error)
- type ProductSKUUpdateImagesParams
- type ProductSKUUpdateImagesResponse
- type ProductSKUUpdateNameParams
- type ProductSKUUpdateNameResponse
- type ProductSKUUpdateParams
- type ProductSKUUpdateParamsDataArray
- type ProductSKUUpdateParamsDataMap
- type ProductSKUUpdateParamsDataUnion
- type ProductSKUUpdateResponse
- type ProductService
- type ProductSpusGetParams
- type ProductSpusGetResponse
- type ProductSpusListParams
- type ProductSpusListParamsKind
- type ProductSpusOriginParams
- type ProductSpusOriginResponse
- type ProductSpusOriginResponseData
- type ProductSpusService
- func (r *ProductSpusService) Get(ctx context.Context, params ProductSpusGetParams, opts ...option.RequestOption) (res *ProductSpusGetResponse, err error)
- func (r *ProductSpusService) List(ctx context.Context, params ProductSpusListParams, ...) (res *pagination.PageNumberPagination[Spu], err error)
- func (r *ProductSpusService) ListAutoPaging(ctx context.Context, params ProductSpusListParams, ...) *pagination.PageNumberPaginationAutoPager[Spu]
- func (r *ProductSpusService) Origin(ctx context.Context, params ProductSpusOriginParams, ...) (res *ProductSpusOriginResponse, err error)
- func (r *ProductSpusService) Update(ctx context.Context, params ProductSpusUpdateParams, ...) (res *ProductSpusUpdateResponse, err error)
- type ProductSpusUpdateParams
- type ProductSpusUpdateParamsI18nData
- type ProductSpusUpdateParamsKind
- type ProductSpusUpdateResponse
- type QaDeleteParams
- type QaDeleteResponse
- type QaGetParams
- type QaGetResponse
- type QaGetResponseData
- type QaGetResponseDataKind
- type QaListParams
- type QaListResponse
- type QaListResponseKind
- type QaNewParams
- type QaNewParamsKind
- type QaNewResponse
- type QaNewResponseData
- type QaService
- func (r *QaService) Delete(ctx context.Context, params QaDeleteParams, opts ...option.RequestOption) (res *QaDeleteResponse, err error)
- func (r *QaService) Get(ctx context.Context, params QaGetParams, opts ...option.RequestOption) (res *QaGetResponse, err error)
- func (r *QaService) List(ctx context.Context, params QaListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[QaListResponse], err error)
- func (r *QaService) ListAutoPaging(ctx context.Context, params QaListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[QaListResponse]
- func (r *QaService) New(ctx context.Context, params QaNewParams, opts ...option.RequestOption) (res *QaNewResponse, err error)
- func (r *QaService) Update(ctx context.Context, params QaUpdateParams, opts ...option.RequestOption) (res *QaUpdateResponse, err error)
- type QaUpdateParams
- type QaUpdateParamsKind
- type QaUpdateResponse
- type SKU
- type SKUDataArray
- type SKUDataMap
- type SKUDataUnion
- type SKUExtra
- type SKUI18nDataArray
- type SKUI18nDataMap
- type SKUKind
- type SKULanguage
- type SchemaGetParams
- type SchemaGetResponse
- type SchemaGetResponseData
- type SchemaGetResponseDataDataArray
- type SchemaGetResponseDataDataMap
- type SchemaGetResponseDataDataUnion
- type SchemaListParams
- type SchemaListResponse
- type SchemaListResponseDataArray
- type SchemaListResponseDataMap
- type SchemaListResponseDataUnion
- type SchemaNewParams
- type SchemaNewParamsDataArray
- type SchemaNewParamsDataMap
- type SchemaNewParamsDataUnion
- type SchemaNewResponse
- type SchemaNewResponseData
- type SchemaService
- func (r *SchemaService) Get(ctx context.Context, params SchemaGetParams, opts ...option.RequestOption) (res *SchemaGetResponse, err error)
- func (r *SchemaService) List(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[SchemaListResponse], err error)
- func (r *SchemaService) ListAutoPaging(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[SchemaListResponse]
- func (r *SchemaService) New(ctx context.Context, params SchemaNewParams, opts ...option.RequestOption) (res *SchemaNewResponse, err error)
- func (r *SchemaService) Update(ctx context.Context, params SchemaUpdateParams, opts ...option.RequestOption) (res *SchemaUpdateResponse, err error)
- type SchemaUpdateParams
- type SchemaUpdateParamsDataArray
- type SchemaUpdateParamsDataMap
- type SchemaUpdateParamsDataUnion
- type SchemaUpdateResponse
- type Skui18nDataUnion
- type Spu
- type SpuExtra
- type SpuI18nData
- type SpuI18nDataLanguage
- type SpuI18nDataTextArray
- type SpuI18nDataTextMap
- type SpuI18nDataTextUnion
- type SpuKind
- type StatisticOverviewParams
- type StatisticOverviewResponse
- type StatisticOverviewResponseData
- type StatisticOverviewResponseDataUnion
- type StatisticOverviewSearchParams
- type StatisticOverviewSearchResponse
- type StatisticOverviewSearchResponseData
- type StatisticOverviewSearchResponseDataUnion
- type StatisticService
- type SystemConfigDeleteParams
- type SystemConfigDeleteResponse
- type SystemConfigGetParams
- type SystemConfigGetResponse
- type SystemConfigGetResponseData
- type SystemConfigGetResponseDataValueArray
- type SystemConfigGetResponseDataValueMap
- type SystemConfigGetResponseDataValueUnion
- type SystemConfigListParams
- type SystemConfigListResponse
- type SystemConfigListResponseValueArray
- type SystemConfigListResponseValueMap
- type SystemConfigListResponseValueUnion
- type SystemConfigNewParams
- type SystemConfigNewParamsValueArray
- type SystemConfigNewParamsValueMap
- type SystemConfigNewParamsValueUnion
- type SystemConfigNewResponse
- type SystemConfigService
- func (r *SystemConfigService) Delete(ctx context.Context, params SystemConfigDeleteParams, ...) (res *SystemConfigDeleteResponse, err error)
- func (r *SystemConfigService) Get(ctx context.Context, params SystemConfigGetParams, ...) (res *SystemConfigGetResponse, err error)
- func (r *SystemConfigService) List(ctx context.Context, params SystemConfigListParams, ...) (res *pagination.PageNumberPagination[SystemConfigListResponse], err error)
- func (r *SystemConfigService) ListAutoPaging(ctx context.Context, params SystemConfigListParams, ...) *pagination.PageNumberPaginationAutoPager[SystemConfigListResponse]
- func (r *SystemConfigService) New(ctx context.Context, params SystemConfigNewParams, ...) (res *SystemConfigNewResponse, err error)
- func (r *SystemConfigService) Update(ctx context.Context, params SystemConfigUpdateParams, ...) (res *SystemConfigUpdateResponse, err error)
- type SystemConfigUpdateParams
- type SystemConfigUpdateParamsValueArray
- type SystemConfigUpdateParamsValueMap
- type SystemConfigUpdateParamsValueUnion
- type SystemConfigUpdateResponse
- type SystemConstantsParams
- type SystemConstantsResponse
- type SystemConstantsResponseData
- type SystemConstantsResponseDataGame
- type SystemConstantsResponseDataLanguage
- type SystemConstantsResponseDataRegion
- type SystemService
- type TempCardSKURelation
- type TempCardSKURelationExtraArray
- type TempCardSKURelationExtraMap
- type TempCardSKURelationExtraUnion
- type TempPackCollectionRelation
- type UploadPresignedURLParams
- type UploadPresignedURLResponse
- type UploadPresignedURLResponseData
- type UploadPresignedURLResponseDataDriver
- type UploadPresignedURLResponseDataPayload
- type UploadPresignedURLResponseDataPayloadUnion
- type UploadService
Constants ¶
const I18nImageKindBanner = shared.I18nImageKindBanner
This is an alias to an internal value.
const I18nImageKindCover = shared.I18nImageKindCover
This is an alias to an internal value.
const I18nImageKindFront = shared.I18nImageKindFront
This is an alias to an internal value.
const I18nImageKindIcon = shared.I18nImageKindIcon
This is an alias to an internal value.
const I18nImageKindImage = shared.I18nImageKindImage
This is an alias to an internal value.
const I18nImageKindLogo = shared.I18nImageKindLogo
This is an alias to an internal value.
const I18nLanguageEnUs = shared.I18nLanguageEnUs
This is an alias to an internal value.
const I18nLanguageJaJp = shared.I18nLanguageJaJp
This is an alias to an internal value.
const I18nLanguageKoKr = shared.I18nLanguageKoKr
This is an alias to an internal value.
const I18nLanguageZhCn = shared.I18nLanguageZhCn
This is an alias to an internal value.
const I18nLanguageZhTw = shared.I18nLanguageZhTw
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (TCGWIKI_API_KEY, TCGWIKI_BASE_URL). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type AdminUserGenAPIKeyResponse ¶
type AdminUserGenAPIKeyResponse struct {
Code int64 `json:"code,required"`
Data AdminUserGenAPIKeyResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id"`
JSON adminUserGenAPIKeyResponseJSON `json:"-"`
}
func (*AdminUserGenAPIKeyResponse) UnmarshalJSON ¶
func (r *AdminUserGenAPIKeyResponse) UnmarshalJSON(data []byte) (err error)
type AdminUserGenAPIKeyResponseData ¶
type AdminUserGenAPIKeyResponseData struct {
APIKey string `json:"api_key,required"`
APISecret string `json:"api_secret,required"`
JSON adminUserGenAPIKeyResponseDataJSON `json:"-"`
}
func (*AdminUserGenAPIKeyResponseData) UnmarshalJSON ¶
func (r *AdminUserGenAPIKeyResponseData) UnmarshalJSON(data []byte) (err error)
type AdminUserRevokeAPIKeyParams ¶
type AdminUserRevokeAPIKeyParams struct {
APIKey param.Field[string] `json:"api_key,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (AdminUserRevokeAPIKeyParams) MarshalJSON ¶
func (r AdminUserRevokeAPIKeyParams) MarshalJSON() (data []byte, err error)
type AdminUserRevokeAPIKeyResponse ¶
type AdminUserRevokeAPIKeyResponse struct {
Code int64 `json:"code,required"`
Data AdminUserRevokeAPIKeyResponseDataUnion `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id"`
JSON adminUserRevokeAPIKeyResponseJSON `json:"-"`
}
func (*AdminUserRevokeAPIKeyResponse) UnmarshalJSON ¶
func (r *AdminUserRevokeAPIKeyResponse) UnmarshalJSON(data []byte) (err error)
type AdminUserRevokeAPIKeyResponseData ¶
type AdminUserRevokeAPIKeyResponseData []interface{}
func (AdminUserRevokeAPIKeyResponseData) ImplementsAdminUserRevokeAPIKeyResponseDataUnion ¶
func (r AdminUserRevokeAPIKeyResponseData) ImplementsAdminUserRevokeAPIKeyResponseDataUnion()
type AdminUserRevokeAPIKeyResponseDataUnion ¶
type AdminUserRevokeAPIKeyResponseDataUnion interface {
ImplementsAdminUserRevokeAPIKeyResponseDataUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, AdminUserRevokeAPIKeyResponseData, AdminUserRevokeAPIKeyResponseData or shared.UnionFloat.
type AdminUserService ¶
type AdminUserService struct {
Options []option.RequestOption
}
AdminUserService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAdminUserService method instead.
func NewAdminUserService ¶
func NewAdminUserService(opts ...option.RequestOption) (r *AdminUserService)
NewAdminUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AdminUserService) GenAPIKey ¶
func (r *AdminUserService) GenAPIKey(ctx context.Context, body AdminUserGenAPIKeyParams, opts ...option.RequestOption) (res *AdminUserGenAPIKeyResponse, err error)
生成 API-Key
func (*AdminUserService) RevokeAPIKey ¶
func (r *AdminUserService) RevokeAPIKey(ctx context.Context, params AdminUserRevokeAPIKeyParams, opts ...option.RequestOption) (res *AdminUserRevokeAPIKeyResponse, err error)
撤销 API-Key
type AuthExchangeFeishuCodeParams ¶
type AuthExchangeFeishuCodeParams struct {
// quer 参数中的 code
Code param.Field[string] `json:"code,required"`
// quer 参数中的 state
State param.Field[string] `json:"state,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (AuthExchangeFeishuCodeParams) MarshalJSON ¶
func (r AuthExchangeFeishuCodeParams) MarshalJSON() (data []byte, err error)
type AuthExchangeFeishuCodeResponse ¶
type AuthExchangeFeishuCodeResponse struct {
Code int64 `json:"code,required"`
Data AuthExchangeFeishuCodeResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON authExchangeFeishuCodeResponseJSON `json:"-"`
}
func (*AuthExchangeFeishuCodeResponse) UnmarshalJSON ¶
func (r *AuthExchangeFeishuCodeResponse) UnmarshalJSON(data []byte) (err error)
type AuthExchangeFeishuCodeResponseData ¶
type AuthExchangeFeishuCodeResponseData struct {
Token string `json:"token,required"`
User AuthExchangeFeishuCodeResponseDataUser `json:"user,required"`
RefererURL string `json:"referer_url"`
JSON authExchangeFeishuCodeResponseDataJSON `json:"-"`
}
func (*AuthExchangeFeishuCodeResponseData) UnmarshalJSON ¶
func (r *AuthExchangeFeishuCodeResponseData) UnmarshalJSON(data []byte) (err error)
type AuthExchangeFeishuCodeResponseDataUser ¶
type AuthExchangeFeishuCodeResponseDataUser struct {
ID string `json:"id,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Nickname string `json:"nickname,required"`
Status string `json:"status,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
Username string `json:"username,required"`
Email string `json:"email,nullable"`
JSON authExchangeFeishuCodeResponseDataUserJSON `json:"-"`
}
func (*AuthExchangeFeishuCodeResponseDataUser) UnmarshalJSON ¶
func (r *AuthExchangeFeishuCodeResponseDataUser) UnmarshalJSON(data []byte) (err error)
type AuthService ¶
type AuthService struct {
Options []option.RequestOption
}
AuthService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthService method instead.
func NewAuthService ¶
func NewAuthService(opts ...option.RequestOption) (r *AuthService)
NewAuthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AuthService) ExchangeFeishuCode ¶
func (r *AuthService) ExchangeFeishuCode(ctx context.Context, params AuthExchangeFeishuCodeParams, opts ...option.RequestOption) (res *AuthExchangeFeishuCodeResponse, err error)
飞书 Auth 回调 Code 获取用户 Token
type Client ¶
type Client struct {
Options []option.RequestOption
Qa *QaService
Collections *CollectionService
Games *GameService
Products *ProductService
System *SystemService
Schemas *SchemaService
Upload *UploadService
Auth *AuthService
AdminUsers *AdminUserService
Statistics *StatisticService
}
Client creates a struct with services and top level methods that help with interacting with the tcgwiki API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (TCGWIKI_API_KEY, TCGWIKI_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type CollectionDataArray ¶
type CollectionDataArray = shared.CollectionDataArray
This is an alias to an internal type.
type CollectionDataMap ¶
type CollectionDataMap = shared.CollectionDataMap
This is an alias to an internal type.
type CollectionDataUnion ¶
type CollectionDataUnion = shared.CollectionDataUnion
This is an alias to an internal type.
type CollectionDeleteParams ¶
type CollectionDeleteParams struct {
Uuid param.Field[string] `json:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionDeleteParams) MarshalJSON ¶
func (r CollectionDeleteParams) MarshalJSON() (data []byte, err error)
type CollectionDeleteResponse ¶
type CollectionDeleteResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionDeleteResponseJSON `json:"-"`
}
func (*CollectionDeleteResponse) UnmarshalJSON ¶
func (r *CollectionDeleteResponse) UnmarshalJSON(data []byte) (err error)
type CollectionGetParams ¶
type CollectionGetParams struct {
// 集合 UUID
Uuid param.Field[string] `query:"uuid,required" format:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionGetParams) URLQuery ¶
func (r CollectionGetParams) URLQuery() (v url.Values)
URLQuery serializes CollectionGetParams's query parameters as `url.Values`.
type CollectionGetResponse ¶
type CollectionGetResponse struct {
Code int64 `json:"code,required"`
Data shared.Collection `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionGetResponseJSON `json:"-"`
}
func (*CollectionGetResponse) UnmarshalJSON ¶
func (r *CollectionGetResponse) UnmarshalJSON(data []byte) (err error)
type CollectionListParams ¶
type CollectionListParams struct {
// 游戏过滤
GameKey param.Field[[]string] `query:"game_key"`
// 过滤缺失或未缺失数据的集合
HasMissing param.Field[bool] `query:"has_missing"`
// 过滤已隐藏或未隐藏的集合
IsHidden param.Field[bool] `query:"is_hidden"`
// 过滤已发布或未发布的集合
IsPublished param.Field[bool] `query:"is_published"`
// 集合类型过滤,默认为空,如果填写则必须是 product, event, tournament
Kind param.Field[CollectionListParamsKind] `query:"kind"`
// 语言过滤
Language param.Field[string] `query:"language"`
// 集合名称模糊匹配
Name param.Field[string] `query:"name"`
// 集合 number 模糊匹配
Number param.Field[string] `query:"number"`
// 排序规则,支持 uuid desc,uuid asc,sort_at desc,sort_at asc 排序(uuid 是创建时间
// ,sort_at 是卡包发售时间)
Order param.Field[[]string] `query:"order"`
// 页码,默认为 1
Page param.Field[int64] `query:"page"`
// 每页数量,默认为 50
PageSize param.Field[int64] `query:"page_size"`
// mysql 中的 pkm_categories 表的 level = 2 或 3 and type = 1 的节点 id
ParentCategoryID param.Field[int64] `query:"parent_category_id"`
SKUUuid param.Field[string] `query:"sku_uuid" format:"uuid"`
// 过滤集合 uuid
Uuid param.Field[[]string] `query:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionListParams) URLQuery ¶
func (r CollectionListParams) URLQuery() (v url.Values)
URLQuery serializes CollectionListParams's query parameters as `url.Values`.
type CollectionListParamsKind ¶
type CollectionListParamsKind string
集合类型过滤,默认为空,如果填写则必须是 product, event, tournament
const ( CollectionListParamsKindProduct CollectionListParamsKind = "product" CollectionListParamsKindEvent CollectionListParamsKind = "event" CollectionListParamsKindTournament CollectionListParamsKind = "tournament" )
func (CollectionListParamsKind) IsKnown ¶
func (r CollectionListParamsKind) IsKnown() bool
type CollectionNewParams ¶
type CollectionNewParams struct {
// 其他数据
Data param.Field[CollectionNewParamsDataUnion] `json:"data,required"`
// 关联游戏 GameKey 列表
GameKeys param.Field[[]string] `json:"game_keys,required"`
// 描述国际化
I18nDescriptions param.Field[[]shared.I18nParam] `json:"i18n_descriptions,required"`
// 名称国际化
I18nNames param.Field[[]shared.I18nParam] `json:"i18n_names,required"`
// 集合类型
Kind param.Field[CollectionNewParamsKind] `json:"kind,required"`
// 语言列表
Languages param.Field[[]shared.GameLanguageParam] `json:"languages,required"`
// 集合名称
Name param.Field[string] `json:"name,required"`
// 集合编号
Number param.Field[string] `json:"number,required"`
// 集合描述
Description param.Field[string] `json:"description"`
// 集合图片
Images param.Field[[]shared.I18nImageParam] `json:"images"`
// 关联 SKU UUID 列表
SKUUuids param.Field[[]string] `json:"sku_uuids" format:"uuid"`
// 排序时间
SortAt param.Field[time.Time] `json:"sort_at" format:"date-time"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionNewParams) MarshalJSON ¶
func (r CollectionNewParams) MarshalJSON() (data []byte, err error)
type CollectionNewParamsDataArray ¶
type CollectionNewParamsDataArray []interface{}
func (CollectionNewParamsDataArray) ImplementsCollectionNewParamsDataUnion ¶
func (r CollectionNewParamsDataArray) ImplementsCollectionNewParamsDataUnion()
type CollectionNewParamsDataMap ¶
type CollectionNewParamsDataMap map[string]interface{}
func (CollectionNewParamsDataMap) ImplementsCollectionNewParamsDataUnion ¶
func (r CollectionNewParamsDataMap) ImplementsCollectionNewParamsDataUnion()
type CollectionNewParamsDataUnion ¶
type CollectionNewParamsDataUnion interface {
ImplementsCollectionNewParamsDataUnion()
}
其他数据
Satisfied by shared.UnionString, shared.UnionBool, CollectionNewParamsDataArray, CollectionNewParamsDataMap, shared.UnionFloat.
type CollectionNewParamsKind ¶
type CollectionNewParamsKind string
集合类型
const ( CollectionNewParamsKindProduct CollectionNewParamsKind = "product" CollectionNewParamsKindEvent CollectionNewParamsKind = "event" CollectionNewParamsKindTournament CollectionNewParamsKind = "tournament" )
func (CollectionNewParamsKind) IsKnown ¶
func (r CollectionNewParamsKind) IsKnown() bool
type CollectionNewResponse ¶
type CollectionNewResponse struct {
Code int64 `json:"code,required"`
Data CollectionNewResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionNewResponseJSON `json:"-"`
}
func (*CollectionNewResponse) UnmarshalJSON ¶
func (r *CollectionNewResponse) UnmarshalJSON(data []byte) (err error)
type CollectionNewResponseData ¶
type CollectionNewResponseData struct {
Uuid string `json:"uuid,required" format:"uuid"`
JSON collectionNewResponseDataJSON `json:"-"`
}
func (*CollectionNewResponseData) UnmarshalJSON ¶
func (r *CollectionNewResponseData) UnmarshalJSON(data []byte) (err error)
type CollectionPublishParams ¶
type CollectionPublishParams struct {
Uuid param.Field[string] `json:"uuid,required" format:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionPublishParams) MarshalJSON ¶
func (r CollectionPublishParams) MarshalJSON() (data []byte, err error)
type CollectionPublishResponse ¶
type CollectionPublishResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionPublishResponseJSON `json:"-"`
}
func (*CollectionPublishResponse) UnmarshalJSON ¶
func (r *CollectionPublishResponse) UnmarshalJSON(data []byte) (err error)
type CollectionRelationByPackIDParams ¶
type CollectionRelationByPackIDParams struct {
ID param.Field[[]int64] `query:"id,required"`
GameKey param.Field[string] `query:"game_key"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionRelationByPackIDParams) URLQuery ¶
func (r CollectionRelationByPackIDParams) URLQuery() (v url.Values)
URLQuery serializes CollectionRelationByPackIDParams's query parameters as `url.Values`.
type CollectionRelationByPackIDResponse ¶
type CollectionRelationByPackIDResponse struct {
Code int64 `json:"code,required"`
Data []TempPackCollectionRelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionRelationByPackIDResponseJSON `json:"-"`
}
func (*CollectionRelationByPackIDResponse) UnmarshalJSON ¶
func (r *CollectionRelationByPackIDResponse) UnmarshalJSON(data []byte) (err error)
type CollectionRelationByPackIDSearchParams ¶
type CollectionRelationByPackIDSearchParams struct {
IDs param.Field[[]int64] `json:"ids,required"`
GameKey param.Field[string] `json:"game_key"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionRelationByPackIDSearchParams) MarshalJSON ¶
func (r CollectionRelationByPackIDSearchParams) MarshalJSON() (data []byte, err error)
type CollectionRelationByPackIDSearchResponse ¶
type CollectionRelationByPackIDSearchResponse struct {
Code int64 `json:"code,required"`
Data []TempPackCollectionRelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionRelationByPackIDSearchResponseJSON `json:"-"`
}
func (*CollectionRelationByPackIDSearchResponse) UnmarshalJSON ¶
func (r *CollectionRelationByPackIDSearchResponse) UnmarshalJSON(data []byte) (err error)
type CollectionRelationByUuidParams ¶
type CollectionRelationByUuidParams struct {
// 支持批量
Uuid param.Field[[]string] `query:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionRelationByUuidParams) URLQuery ¶
func (r CollectionRelationByUuidParams) URLQuery() (v url.Values)
URLQuery serializes CollectionRelationByUuidParams's query parameters as `url.Values`.
type CollectionRelationByUuidResponse ¶
type CollectionRelationByUuidResponse struct {
Code int64 `json:"code,required"`
Data []TempPackCollectionRelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionRelationByUuidResponseJSON `json:"-"`
}
func (*CollectionRelationByUuidResponse) UnmarshalJSON ¶
func (r *CollectionRelationByUuidResponse) UnmarshalJSON(data []byte) (err error)
type CollectionRelationByUuidSearchParams ¶
type CollectionRelationByUuidSearchParams struct {
Uuids param.Field[[]string] `json:"uuids,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionRelationByUuidSearchParams) MarshalJSON ¶
func (r CollectionRelationByUuidSearchParams) MarshalJSON() (data []byte, err error)
type CollectionRelationByUuidSearchResponse ¶
type CollectionRelationByUuidSearchResponse struct {
Code int64 `json:"code,required"`
Data []TempPackCollectionRelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionRelationByUuidSearchResponseJSON `json:"-"`
}
func (*CollectionRelationByUuidSearchResponse) UnmarshalJSON ¶
func (r *CollectionRelationByUuidSearchResponse) UnmarshalJSON(data []byte) (err error)
type CollectionSearchParams ¶
type CollectionSearchParams struct {
Page param.Field[int64] `query:"page"`
PageSize param.Field[int64] `query:"page_size"`
// 游戏过滤
GameKeys param.Field[[]string] `json:"game_keys"`
// 过滤缺失或未缺失数据的集合
HasMissing param.Field[bool] `json:"has_missing"`
// 过滤已隐藏或未隐藏的集合
IsHidden param.Field[bool] `json:"is_hidden"`
// 过滤已发布或未发布的集合
IsPublished param.Field[bool] `json:"is_published"`
// 集合类型过滤,默认为空,如果填写则必须是 product, event, tournament
Kind param.Field[CollectionSearchParamsKind] `json:"kind"`
// 语言过滤
Language param.Field[string] `json:"language"`
// 集合名称模糊匹配
Name param.Field[string] `json:"name"`
// 集合 number 模糊匹配
Number param.Field[string] `json:"number"`
// 排序规则,支持 uuid desc,uuid asc,sort_at desc,sort_at asc 排序(uuid 是创建时间
// ,sort_at 是卡包发售时间)
Orders param.Field[[]CollectionSearchParamsOrder] `json:"orders"`
// mysql 中的 pkm_categories 表的 level = 2 或 3 and type = 1 的节点 id
ParentCategoryID param.Field[int64] `json:"parent_category_id"`
SKUUuid param.Field[string] `json:"sku_uuid"`
// 集合 uuids 列表
Uuids param.Field[[]string] `json:"uuids"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionSearchParams) MarshalJSON ¶
func (r CollectionSearchParams) MarshalJSON() (data []byte, err error)
func (CollectionSearchParams) URLQuery ¶
func (r CollectionSearchParams) URLQuery() (v url.Values)
URLQuery serializes CollectionSearchParams's query parameters as `url.Values`.
type CollectionSearchParamsKind ¶
type CollectionSearchParamsKind string
集合类型过滤,默认为空,如果填写则必须是 product, event, tournament
const ( CollectionSearchParamsKindProduct CollectionSearchParamsKind = "product" CollectionSearchParamsKindEvent CollectionSearchParamsKind = "event" CollectionSearchParamsKindTournament CollectionSearchParamsKind = "tournament" )
func (CollectionSearchParamsKind) IsKnown ¶
func (r CollectionSearchParamsKind) IsKnown() bool
type CollectionSearchParamsOrder ¶
type CollectionSearchParamsOrder string
const ( CollectionSearchParamsOrderUuidDesc CollectionSearchParamsOrder = "uuid desc" CollectionSearchParamsOrderUuidAsc CollectionSearchParamsOrder = "uuid asc" CollectionSearchParamsOrderSortAtDesc CollectionSearchParamsOrder = "sort_at desc" CollectionSearchParamsOrderSortAtAsc CollectionSearchParamsOrder = "sort_at asc" )
func (CollectionSearchParamsOrder) IsKnown ¶
func (r CollectionSearchParamsOrder) IsKnown() bool
type CollectionService ¶
type CollectionService struct {
Options []option.RequestOption
}
CollectionService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCollectionService method instead.
func NewCollectionService ¶
func NewCollectionService(opts ...option.RequestOption) (r *CollectionService)
NewCollectionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CollectionService) Delete ¶
func (r *CollectionService) Delete(ctx context.Context, params CollectionDeleteParams, opts ...option.RequestOption) (res *CollectionDeleteResponse, err error)
根据 UUID 删除集合
func (*CollectionService) Get ¶
func (r *CollectionService) Get(ctx context.Context, params CollectionGetParams, opts ...option.RequestOption) (res *CollectionGetResponse, err error)
根据 UUID 获取集合详细信息
func (*CollectionService) List ¶
func (r *CollectionService) List(ctx context.Context, params CollectionListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[shared.Collection], err error)
根据过滤条件获取集合列表,支持分页
func (*CollectionService) ListAutoPaging ¶
func (r *CollectionService) ListAutoPaging(ctx context.Context, params CollectionListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[shared.Collection]
根据过滤条件获取集合列表,支持分页
func (*CollectionService) New ¶
func (r *CollectionService) New(ctx context.Context, params CollectionNewParams, opts ...option.RequestOption) (res *CollectionNewResponse, err error)
创建新的集合
func (*CollectionService) Publish ¶
func (r *CollectionService) Publish(ctx context.Context, params CollectionPublishParams, opts ...option.RequestOption) (res *CollectionPublishResponse, err error)
发布集合
func (*CollectionService) RelationByPackID ¶
func (r *CollectionService) RelationByPackID(ctx context.Context, params CollectionRelationByPackIDParams, opts ...option.RequestOption) (res *CollectionRelationByPackIDResponse, err error)
根据 pack_ids 获取关联关系
func (*CollectionService) RelationByPackIDSearch ¶
func (r *CollectionService) RelationByPackIDSearch(ctx context.Context, params CollectionRelationByPackIDSearchParams, opts ...option.RequestOption) (res *CollectionRelationByPackIDSearchResponse, err error)
根据 pack_ids 获取关联关系
func (*CollectionService) RelationByUuid ¶
func (r *CollectionService) RelationByUuid(ctx context.Context, params CollectionRelationByUuidParams, opts ...option.RequestOption) (res *CollectionRelationByUuidResponse, err error)
根据 collection uuids 获取关联关系
func (*CollectionService) RelationByUuidSearch ¶
func (r *CollectionService) RelationByUuidSearch(ctx context.Context, params CollectionRelationByUuidSearchParams, opts ...option.RequestOption) (res *CollectionRelationByUuidSearchResponse, err error)
根据 collection uuids 获取关联关系
func (*CollectionService) Search ¶
func (r *CollectionService) Search(ctx context.Context, params CollectionSearchParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[shared.Collection], err error)
根据过滤条件获取集合列表,支持分页
func (*CollectionService) SearchAutoPaging ¶
func (r *CollectionService) SearchAutoPaging(ctx context.Context, params CollectionSearchParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[shared.Collection]
根据过滤条件获取集合列表,支持分页
func (*CollectionService) Update ¶
func (r *CollectionService) Update(ctx context.Context, params CollectionUpdateParams, opts ...option.RequestOption) (res *CollectionUpdateResponse, err error)
更新现有集合信息
type CollectionUpdateParams ¶
type CollectionUpdateParams struct {
// 其他数据
Data param.Field[CollectionUpdateParamsDataUnion] `json:"data,required"`
// 关联游戏 GameKey 列表
GameKeys param.Field[[]string] `json:"game_keys,required"`
// 描述国际化
I18nDescriptions param.Field[[]shared.I18nParam] `json:"i18n_descriptions,required"`
// 名称国际化
I18nNames param.Field[[]shared.I18nParam] `json:"i18n_names,required"`
// 集合类型
Kind param.Field[CollectionUpdateParamsKind] `json:"kind,required"`
// 语言列表
Languages param.Field[[]shared.GameLanguageParam] `json:"languages,required"`
// 集合名称
Name param.Field[string] `json:"name,required"`
// 集合编号
Number param.Field[string] `json:"number,required"`
Uuid param.Field[string] `json:"uuid,required" format:"uuid"`
// 集合描述
Description param.Field[string] `json:"description"`
// 集合图片
Images param.Field[[]shared.I18nImageParam] `json:"images"`
// 关联 SKU UUID 列表
SKUUuids param.Field[[]string] `json:"sku_uuids" format:"uuid"`
// 排序时间
SortAt param.Field[time.Time] `json:"sort_at" format:"date-time"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (CollectionUpdateParams) MarshalJSON ¶
func (r CollectionUpdateParams) MarshalJSON() (data []byte, err error)
type CollectionUpdateParamsDataArray ¶
type CollectionUpdateParamsDataArray []interface{}
func (CollectionUpdateParamsDataArray) ImplementsCollectionUpdateParamsDataUnion ¶
func (r CollectionUpdateParamsDataArray) ImplementsCollectionUpdateParamsDataUnion()
type CollectionUpdateParamsDataMap ¶
type CollectionUpdateParamsDataMap map[string]interface{}
func (CollectionUpdateParamsDataMap) ImplementsCollectionUpdateParamsDataUnion ¶
func (r CollectionUpdateParamsDataMap) ImplementsCollectionUpdateParamsDataUnion()
type CollectionUpdateParamsDataUnion ¶
type CollectionUpdateParamsDataUnion interface {
ImplementsCollectionUpdateParamsDataUnion()
}
其他数据
Satisfied by shared.UnionString, shared.UnionBool, CollectionUpdateParamsDataArray, CollectionUpdateParamsDataMap, shared.UnionFloat.
type CollectionUpdateParamsKind ¶
type CollectionUpdateParamsKind string
集合类型
const ( CollectionUpdateParamsKindProduct CollectionUpdateParamsKind = "product" CollectionUpdateParamsKindEvent CollectionUpdateParamsKind = "event" CollectionUpdateParamsKindTournament CollectionUpdateParamsKind = "tournament" )
func (CollectionUpdateParamsKind) IsKnown ¶
func (r CollectionUpdateParamsKind) IsKnown() bool
type CollectionUpdateResponse ¶
type CollectionUpdateResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON collectionUpdateResponseJSON `json:"-"`
}
func (*CollectionUpdateResponse) UnmarshalJSON ¶
func (r *CollectionUpdateResponse) UnmarshalJSON(data []byte) (err error)
type GameDeleteParams ¶
type GameDeleteParams struct {
// game_key
GameKey param.Field[string] `json:"game_key,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (GameDeleteParams) MarshalJSON ¶
func (r GameDeleteParams) MarshalJSON() (data []byte, err error)
type GameDeleteResponse ¶
type GameDeleteResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON gameDeleteResponseJSON `json:"-"`
}
func (*GameDeleteResponse) UnmarshalJSON ¶
func (r *GameDeleteResponse) UnmarshalJSON(data []byte) (err error)
type GameGetParams ¶
type GameGetParams struct {
// game_key,游戏简写
GameKey param.Field[string] `query:"game_key,required"`
// 不生成 filter 数据
ParseFiltersDisabled param.Field[bool] `query:"parse_filters_disabled"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (GameGetParams) URLQuery ¶
func (r GameGetParams) URLQuery() (v url.Values)
URLQuery serializes GameGetParams's query parameters as `url.Values`.
type GameGetResponse ¶
type GameGetResponse struct {
Code int64 `json:"code,required"`
Data GameGetResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON gameGetResponseJSON `json:"-"`
}
func (*GameGetResponse) UnmarshalJSON ¶
func (r *GameGetResponse) UnmarshalJSON(data []byte) (err error)
type GameGetResponseData ¶
type GameGetResponseData struct {
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
GameConfig GameGetResponseDataGameConfigUnion `json:"game_config,required,nullable"`
GameExtend GameGetResponseDataGameExtendUnion `json:"game_extend,required,nullable"`
GameKey string `json:"game_key,required"`
I18nDescriptions []shared.I18n `json:"i18n_descriptions,required,nullable"`
I18nImages []shared.I18nImage `json:"i18n_images,required"`
I18nNames []shared.I18n `json:"i18n_names,required"`
Kind GameGetResponseDataKind `json:"kind,required"`
PublishCompany string `json:"publish_company,required"`
Regions []string `json:"regions,required"`
Series string `json:"series,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
PublishDate int64 `json:"publish_date,nullable"`
JSON gameGetResponseDataJSON `json:"-"`
}
func (*GameGetResponseData) UnmarshalJSON ¶
func (r *GameGetResponseData) UnmarshalJSON(data []byte) (err error)
type GameGetResponseDataGameConfigArray ¶
type GameGetResponseDataGameConfigArray []interface{}
func (GameGetResponseDataGameConfigArray) ImplementsGameGetResponseDataGameConfigUnion ¶
func (r GameGetResponseDataGameConfigArray) ImplementsGameGetResponseDataGameConfigUnion()
type GameGetResponseDataGameConfigMap ¶
type GameGetResponseDataGameConfigMap map[string]interface{}
func (GameGetResponseDataGameConfigMap) ImplementsGameGetResponseDataGameConfigUnion ¶
func (r GameGetResponseDataGameConfigMap) ImplementsGameGetResponseDataGameConfigUnion()
type GameGetResponseDataGameConfigUnion ¶
type GameGetResponseDataGameConfigUnion interface {
ImplementsGameGetResponseDataGameConfigUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, GameGetResponseDataGameConfigArray, GameGetResponseDataGameConfigMap or shared.UnionFloat.
type GameGetResponseDataGameExtendArray ¶
type GameGetResponseDataGameExtendArray []interface{}
func (GameGetResponseDataGameExtendArray) ImplementsGameGetResponseDataGameExtendUnion ¶
func (r GameGetResponseDataGameExtendArray) ImplementsGameGetResponseDataGameExtendUnion()
type GameGetResponseDataGameExtendMap ¶
type GameGetResponseDataGameExtendMap map[string]interface{}
func (GameGetResponseDataGameExtendMap) ImplementsGameGetResponseDataGameExtendUnion ¶
func (r GameGetResponseDataGameExtendMap) ImplementsGameGetResponseDataGameExtendUnion()
type GameGetResponseDataGameExtendUnion ¶
type GameGetResponseDataGameExtendUnion interface {
ImplementsGameGetResponseDataGameExtendUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, GameGetResponseDataGameExtendArray, GameGetResponseDataGameExtendMap or shared.UnionFloat.
type GameGetResponseDataKind ¶
type GameGetResponseDataKind string
const ( GameGetResponseDataKindPhysical GameGetResponseDataKind = "physical" GameGetResponseDataKindDigital GameGetResponseDataKind = "digital" GameGetResponseDataKindOnline GameGetResponseDataKind = "online" )
func (GameGetResponseDataKind) IsKnown ¶
func (r GameGetResponseDataKind) IsKnown() bool
type GameLanguageParam ¶
type GameLanguageParam = shared.GameLanguageParam
This is an alias to an internal type.
type GameListParams ¶
type GameListParams struct {
// 游戏标识 key 过滤
GameKey param.Field[string] `query:"game_key"`
// 游戏名称关键词搜索
Name param.Field[string] `query:"name"`
// 页号默认 1
Page param.Field[int64] `query:"page"`
// 页大小默认 50
PageSize param.Field[int64] `query:"page_size"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (GameListParams) URLQuery ¶
func (r GameListParams) URLQuery() (v url.Values)
URLQuery serializes GameListParams's query parameters as `url.Values`.
type GameListResponse ¶
type GameListResponse struct {
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
GameConfig GameListResponseGameConfigUnion `json:"game_config,required,nullable"`
GameExtend GameListResponseGameExtendUnion `json:"game_extend,required,nullable"`
GameKey string `json:"game_key,required"`
I18nDescriptions []shared.I18n `json:"i18n_descriptions,required,nullable"`
I18nImages []shared.I18nImage `json:"i18n_images,required"`
I18nNames []shared.I18n `json:"i18n_names,required"`
Kind GameListResponseKind `json:"kind,required"`
PublishCompany string `json:"publish_company,required"`
Regions []string `json:"regions,required"`
Series string `json:"series,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
PublishDate int64 `json:"publish_date,nullable"`
JSON gameListResponseJSON `json:"-"`
}
func (*GameListResponse) UnmarshalJSON ¶
func (r *GameListResponse) UnmarshalJSON(data []byte) (err error)
type GameListResponseGameConfigArray ¶
type GameListResponseGameConfigArray []interface{}
func (GameListResponseGameConfigArray) ImplementsGameListResponseGameConfigUnion ¶
func (r GameListResponseGameConfigArray) ImplementsGameListResponseGameConfigUnion()
type GameListResponseGameConfigMap ¶
type GameListResponseGameConfigMap map[string]interface{}
func (GameListResponseGameConfigMap) ImplementsGameListResponseGameConfigUnion ¶
func (r GameListResponseGameConfigMap) ImplementsGameListResponseGameConfigUnion()
type GameListResponseGameConfigUnion ¶
type GameListResponseGameConfigUnion interface {
ImplementsGameListResponseGameConfigUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, GameListResponseGameConfigArray, GameListResponseGameConfigMap or shared.UnionFloat.
type GameListResponseGameExtendArray ¶
type GameListResponseGameExtendArray []interface{}
func (GameListResponseGameExtendArray) ImplementsGameListResponseGameExtendUnion ¶
func (r GameListResponseGameExtendArray) ImplementsGameListResponseGameExtendUnion()
type GameListResponseGameExtendMap ¶
type GameListResponseGameExtendMap map[string]interface{}
func (GameListResponseGameExtendMap) ImplementsGameListResponseGameExtendUnion ¶
func (r GameListResponseGameExtendMap) ImplementsGameListResponseGameExtendUnion()
type GameListResponseGameExtendUnion ¶
type GameListResponseGameExtendUnion interface {
ImplementsGameListResponseGameExtendUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, GameListResponseGameExtendArray, GameListResponseGameExtendMap or shared.UnionFloat.
type GameListResponseKind ¶
type GameListResponseKind string
const ( GameListResponseKindPhysical GameListResponseKind = "physical" GameListResponseKindDigital GameListResponseKind = "digital" GameListResponseKindOnline GameListResponseKind = "online" )
func (GameListResponseKind) IsKnown ¶
func (r GameListResponseKind) IsKnown() bool
type GameNewParams ¶
type GameNewParams struct {
// 游戏标识 key
GameKey param.Field[string] `json:"game_key,required"`
// 游戏图标 URL logo icon 等
I18nImages param.Field[[]shared.I18nImageParam] `json:"i18n_images,required"`
// 名称国际化
I18nNames param.Field[[]shared.I18nParam] `json:"i18n_names,required"`
// 游戏类型 (physical:实体游戏,digital:电子游戏,online:网络发行)
Kind param.Field[GameNewParamsKind] `json:"kind,required"`
// 发布时间
PublishDate param.Field[int64] `json:"publish_date,required"`
// 发行地区列表
Regions param.Field[[]string] `json:"regions,required"`
// 游戏系列
Series param.Field[string] `json:"series,required"`
// 游戏配置
GameConfig param.Field[GameNewParamsGameConfigUnion] `json:"game_config"`
// 游戏扩展信息
GameExtend param.Field[GameNewParamsGameExtendUnion] `json:"game_extend"`
// 国际化游戏描述
I18nDescriptions param.Field[[]shared.I18nParam] `json:"i18n_descriptions"`
// 发行公司
PublishCompany param.Field[string] `json:"publish_company"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (GameNewParams) MarshalJSON ¶
func (r GameNewParams) MarshalJSON() (data []byte, err error)
type GameNewParamsGameConfigArray ¶
type GameNewParamsGameConfigArray []interface{}
func (GameNewParamsGameConfigArray) ImplementsGameNewParamsGameConfigUnion ¶
func (r GameNewParamsGameConfigArray) ImplementsGameNewParamsGameConfigUnion()
type GameNewParamsGameConfigMap ¶
type GameNewParamsGameConfigMap map[string]interface{}
func (GameNewParamsGameConfigMap) ImplementsGameNewParamsGameConfigUnion ¶
func (r GameNewParamsGameConfigMap) ImplementsGameNewParamsGameConfigUnion()
type GameNewParamsGameConfigUnion ¶
type GameNewParamsGameConfigUnion interface {
ImplementsGameNewParamsGameConfigUnion()
}
游戏配置
Satisfied by shared.UnionString, shared.UnionBool, GameNewParamsGameConfigArray, GameNewParamsGameConfigMap, shared.UnionFloat.
type GameNewParamsGameExtendArray ¶
type GameNewParamsGameExtendArray []interface{}
func (GameNewParamsGameExtendArray) ImplementsGameNewParamsGameExtendUnion ¶
func (r GameNewParamsGameExtendArray) ImplementsGameNewParamsGameExtendUnion()
type GameNewParamsGameExtendMap ¶
type GameNewParamsGameExtendMap map[string]interface{}
func (GameNewParamsGameExtendMap) ImplementsGameNewParamsGameExtendUnion ¶
func (r GameNewParamsGameExtendMap) ImplementsGameNewParamsGameExtendUnion()
type GameNewParamsGameExtendUnion ¶
type GameNewParamsGameExtendUnion interface {
ImplementsGameNewParamsGameExtendUnion()
}
游戏扩展信息
Satisfied by shared.UnionString, shared.UnionBool, GameNewParamsGameExtendArray, GameNewParamsGameExtendMap, shared.UnionFloat.
type GameNewParamsKind ¶
type GameNewParamsKind string
游戏类型 (physical:实体游戏,digital:电子游戏,online:网络发行)
const ( GameNewParamsKindPhysical GameNewParamsKind = "physical" GameNewParamsKindDigital GameNewParamsKind = "digital" GameNewParamsKindOnline GameNewParamsKind = "online" )
func (GameNewParamsKind) IsKnown ¶
func (r GameNewParamsKind) IsKnown() bool
type GameNewResponse ¶
type GameNewResponse struct {
Code int64 `json:"code,required"`
Data GameNewResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON gameNewResponseJSON `json:"-"`
}
func (*GameNewResponse) UnmarshalJSON ¶
func (r *GameNewResponse) UnmarshalJSON(data []byte) (err error)
type GameNewResponseData ¶
type GameNewResponseData struct {
GameKey string `json:"game_key,required"`
JSON gameNewResponseDataJSON `json:"-"`
}
func (*GameNewResponseData) UnmarshalJSON ¶
func (r *GameNewResponseData) UnmarshalJSON(data []byte) (err error)
type GameService ¶
type GameService struct {
Options []option.RequestOption
}
GameService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGameService method instead.
func NewGameService ¶
func NewGameService(opts ...option.RequestOption) (r *GameService)
NewGameService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GameService) Delete ¶
func (r *GameService) Delete(ctx context.Context, params GameDeleteParams, opts ...option.RequestOption) (res *GameDeleteResponse, err error)
根据 game_key 删除游戏
func (*GameService) Get ¶
func (r *GameService) Get(ctx context.Context, params GameGetParams, opts ...option.RequestOption) (res *GameGetResponse, err error)
获取游戏详情
func (*GameService) List ¶
func (r *GameService) List(ctx context.Context, params GameListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[GameListResponse], err error)
根据过滤条件获取游戏列表,支持分页
func (*GameService) ListAutoPaging ¶
func (r *GameService) ListAutoPaging(ctx context.Context, params GameListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[GameListResponse]
根据过滤条件获取游戏列表,支持分页
func (*GameService) New ¶
func (r *GameService) New(ctx context.Context, params GameNewParams, opts ...option.RequestOption) (res *GameNewResponse, err error)
创建新的游戏
func (*GameService) Update ¶
func (r *GameService) Update(ctx context.Context, params GameUpdateParams, opts ...option.RequestOption) (res *GameUpdateResponse, err error)
更新现有游戏信息
type GameUpdateParams ¶
type GameUpdateParams struct {
// 游戏标识 key
GameKey param.Field[string] `json:"game_key,required"`
// 游戏图标 URL logo icon 等
I18nImages param.Field[[]shared.I18nImageParam] `json:"i18n_images,required"`
// 名称国际化
I18nNames param.Field[[]shared.I18nParam] `json:"i18n_names,required"`
// 游戏类型 (physical:实体游戏,digital:电子游戏,online:网络发行)
Kind param.Field[GameUpdateParamsKind] `json:"kind,required"`
// 发布时间
PublishDate param.Field[int64] `json:"publish_date,required"`
// 发行地区列表
Regions param.Field[[]string] `json:"regions,required"`
// 游戏系列
Series param.Field[string] `json:"series,required"`
// 游戏配置
GameConfig param.Field[GameUpdateParamsGameConfigUnion] `json:"game_config"`
// 游戏扩展信息
GameExtend param.Field[GameUpdateParamsGameExtendUnion] `json:"game_extend"`
// 国际化游戏描述
I18nDescriptions param.Field[[]shared.I18nParam] `json:"i18n_descriptions"`
// 发行公司
PublishCompany param.Field[string] `json:"publish_company"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (GameUpdateParams) MarshalJSON ¶
func (r GameUpdateParams) MarshalJSON() (data []byte, err error)
type GameUpdateParamsGameConfigArray ¶
type GameUpdateParamsGameConfigArray []interface{}
func (GameUpdateParamsGameConfigArray) ImplementsGameUpdateParamsGameConfigUnion ¶
func (r GameUpdateParamsGameConfigArray) ImplementsGameUpdateParamsGameConfigUnion()
type GameUpdateParamsGameConfigMap ¶
type GameUpdateParamsGameConfigMap map[string]interface{}
func (GameUpdateParamsGameConfigMap) ImplementsGameUpdateParamsGameConfigUnion ¶
func (r GameUpdateParamsGameConfigMap) ImplementsGameUpdateParamsGameConfigUnion()
type GameUpdateParamsGameConfigUnion ¶
type GameUpdateParamsGameConfigUnion interface {
ImplementsGameUpdateParamsGameConfigUnion()
}
游戏配置
Satisfied by shared.UnionString, shared.UnionBool, GameUpdateParamsGameConfigArray, GameUpdateParamsGameConfigMap, shared.UnionFloat.
type GameUpdateParamsGameExtendArray ¶
type GameUpdateParamsGameExtendArray []interface{}
func (GameUpdateParamsGameExtendArray) ImplementsGameUpdateParamsGameExtendUnion ¶
func (r GameUpdateParamsGameExtendArray) ImplementsGameUpdateParamsGameExtendUnion()
type GameUpdateParamsGameExtendMap ¶
type GameUpdateParamsGameExtendMap map[string]interface{}
func (GameUpdateParamsGameExtendMap) ImplementsGameUpdateParamsGameExtendUnion ¶
func (r GameUpdateParamsGameExtendMap) ImplementsGameUpdateParamsGameExtendUnion()
type GameUpdateParamsGameExtendUnion ¶
type GameUpdateParamsGameExtendUnion interface {
ImplementsGameUpdateParamsGameExtendUnion()
}
游戏扩展信息
Satisfied by shared.UnionString, shared.UnionBool, GameUpdateParamsGameExtendArray, GameUpdateParamsGameExtendMap, shared.UnionFloat.
type GameUpdateParamsKind ¶
type GameUpdateParamsKind string
游戏类型 (physical:实体游戏,digital:电子游戏,online:网络发行)
const ( GameUpdateParamsKindPhysical GameUpdateParamsKind = "physical" GameUpdateParamsKindDigital GameUpdateParamsKind = "digital" GameUpdateParamsKindOnline GameUpdateParamsKind = "online" )
func (GameUpdateParamsKind) IsKnown ¶
func (r GameUpdateParamsKind) IsKnown() bool
type GameUpdateResponse ¶
type GameUpdateResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON gameUpdateResponseJSON `json:"-"`
}
func (*GameUpdateResponse) UnmarshalJSON ¶
func (r *GameUpdateResponse) UnmarshalJSON(data []byte) (err error)
type I18nImageKind ¶
type I18nImageKind = shared.I18nImageKind
图片类型例:cover, banner, icon
This is an alias to an internal type.
type I18nImageParam ¶
type I18nImageParam = shared.I18nImageParam
图片结构
This is an alias to an internal type.
type I18nLanguage ¶
type I18nLanguage = shared.I18nLanguage
语言代码 (zh-CN,zh-TW,ja-JP,en-US 等等)
This is an alias to an internal type.
type ProductSKUDeleteParams ¶
type ProductSKUDeleteParams struct {
// sku uuid
Uuid param.Field[string] `json:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUDeleteParams) MarshalJSON ¶
func (r ProductSKUDeleteParams) MarshalJSON() (data []byte, err error)
type ProductSKUDeleteResponse ¶
type ProductSKUDeleteResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUDeleteResponseJSON `json:"-"`
}
func (*ProductSKUDeleteResponse) UnmarshalJSON ¶
func (r *ProductSKUDeleteResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUGetManyParams ¶
type ProductSKUGetManyParams struct {
// sku uuid
Uuid param.Field[[]string] `query:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUGetManyParams) URLQuery ¶
func (r ProductSKUGetManyParams) URLQuery() (v url.Values)
URLQuery serializes ProductSKUGetManyParams's query parameters as `url.Values`.
type ProductSKUGetManyResponse ¶
type ProductSKUGetManyResponse struct {
Code int64 `json:"code,required"`
Data []SKU `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUGetManyResponseJSON `json:"-"`
}
func (*ProductSKUGetManyResponse) UnmarshalJSON ¶
func (r *ProductSKUGetManyResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUGetManySearchParams ¶
type ProductSKUGetManySearchParams struct {
// uuids 列表
Uuids param.Field[[]string] `json:"uuids,required" format:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUGetManySearchParams) MarshalJSON ¶
func (r ProductSKUGetManySearchParams) MarshalJSON() (data []byte, err error)
type ProductSKUGetManySearchResponse ¶
type ProductSKUGetManySearchResponse struct {
Code int64 `json:"code,required"`
Data []SKU `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUGetManySearchResponseJSON `json:"-"`
}
func (*ProductSKUGetManySearchResponse) UnmarshalJSON ¶
func (r *ProductSKUGetManySearchResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUGetParams ¶
type ProductSKUGetParams struct {
// sku uuid
Uuid param.Field[string] `query:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUGetParams) URLQuery ¶
func (r ProductSKUGetParams) URLQuery() (v url.Values)
URLQuery serializes ProductSKUGetParams's query parameters as `url.Values`.
type ProductSKUGetResponse ¶
type ProductSKUGetResponse struct {
Code int64 `json:"code,required"`
Data SKU `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUGetResponseJSON `json:"-"`
}
func (*ProductSKUGetResponse) UnmarshalJSON ¶
func (r *ProductSKUGetResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUListParams ¶
type ProductSKUListParams struct {
// game_key
GameKey param.Field[string] `query:"game_key"`
// 过滤缺失或未缺失数据的卡牌
HasMissing param.Field[bool] `query:"has_missing"`
// 过滤已隐藏或未隐藏的卡牌
IsHidden param.Field[bool] `query:"is_hidden"`
// 过滤已发布或未发布的卡牌
IsPublished param.Field[bool] `query:"is_published"`
// 类型,card 和 goods
Kind param.Field[ProductSKUListParamsKind] `query:"kind"`
// 语言,zh-TW, zh-CN 等
Language param.Field[string] `query:"language"`
// 过滤卡名,模糊匹配
Name param.Field[string] `query:"name"`
// 卡编号,模糊匹配
Number param.Field[string] `query:"number"`
// 页码,默认 1
Page param.Field[int64] `query:"page"`
// 每页条数,默认 50
PageSize param.Field[int64] `query:"page_size"`
// 罕贵度,精确查询
Rarity param.Field[string] `query:"rarity"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUListParams) URLQuery ¶
func (r ProductSKUListParams) URLQuery() (v url.Values)
URLQuery serializes ProductSKUListParams's query parameters as `url.Values`.
type ProductSKUListParamsKind ¶
type ProductSKUListParamsKind string
类型,card 和 goods
const ( ProductSKUListParamsKindCard ProductSKUListParamsKind = "card" ProductSKUListParamsKindGoods ProductSKUListParamsKind = "goods" )
func (ProductSKUListParamsKind) IsKnown ¶
func (r ProductSKUListParamsKind) IsKnown() bool
type ProductSKUMergeParams ¶
type ProductSKUMergeParams struct {
// 不可以是已发布的
FromUuid param.Field[string] `json:"from_uuid,required"`
TargetUuid param.Field[string] `json:"target_uuid,required"`
// 空时代表以 target 信息为准,字段参考创建 sku 接口
MergeData param.Field[ProductSKUMergeParamsMergeDataUnion] `json:"merge_data"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUMergeParams) MarshalJSON ¶
func (r ProductSKUMergeParams) MarshalJSON() (data []byte, err error)
type ProductSKUMergeParamsMergeDataMergeDataArray ¶
type ProductSKUMergeParamsMergeDataMergeDataArray []interface{}
func (ProductSKUMergeParamsMergeDataMergeDataArray) ImplementsProductSKUMergeParamsMergeDataUnion ¶
func (r ProductSKUMergeParamsMergeDataMergeDataArray) ImplementsProductSKUMergeParamsMergeDataUnion()
type ProductSKUMergeParamsMergeDataMergeDataObject ¶
type ProductSKUMergeParamsMergeDataMergeDataObject map[string]interface{}
func (ProductSKUMergeParamsMergeDataMergeDataObject) ImplementsProductSKUMergeParamsMergeDataUnion ¶
func (r ProductSKUMergeParamsMergeDataMergeDataObject) ImplementsProductSKUMergeParamsMergeDataUnion()
type ProductSKUMergeParamsMergeDataUnion ¶
type ProductSKUMergeParamsMergeDataUnion interface {
ImplementsProductSKUMergeParamsMergeDataUnion()
}
空时代表以 target 信息为准,字段参考创建 sku 接口
Satisfied by shared.UnionString, shared.UnionBool, ProductSKUMergeParamsMergeDataMergeDataArray, ProductSKUMergeParamsMergeDataMergeDataObject, shared.UnionFloat.
type ProductSKUMergeRelationParams ¶
type ProductSKUMergeRelationParams struct {
FromUuid param.Field[[]string] `query:"from_uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUMergeRelationParams) URLQuery ¶
func (r ProductSKUMergeRelationParams) URLQuery() (v url.Values)
URLQuery serializes ProductSKUMergeRelationParams's query parameters as `url.Values`.
type ProductSKUMergeRelationResponse ¶
type ProductSKUMergeRelationResponse struct {
Code int64 `json:"code,required"`
Data ProductSKUMergeRelationResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUMergeRelationResponseJSON `json:"-"`
}
func (*ProductSKUMergeRelationResponse) UnmarshalJSON ¶
func (r *ProductSKUMergeRelationResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUMergeRelationResponseData ¶
type ProductSKUMergeRelationResponseData struct {
// key: from_uuid, value: target_uuid
MergeMap map[string]string `json:"merge_map,required,nullable"`
JSON productSKUMergeRelationResponseDataJSON `json:"-"`
}
func (*ProductSKUMergeRelationResponseData) UnmarshalJSON ¶
func (r *ProductSKUMergeRelationResponseData) UnmarshalJSON(data []byte) (err error)
type ProductSKUMergeResponse ¶
type ProductSKUMergeResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUMergeResponseJSON `json:"-"`
}
func (*ProductSKUMergeResponse) UnmarshalJSON ¶
func (r *ProductSKUMergeResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUNewParams ¶
type ProductSKUNewParams struct {
// 卡牌别名数组
Aliases param.Field[[]string] `json:"aliases,required"`
// 不同游戏结构不同,具体参考"字段描述"文档
Data param.Field[ProductSKUNewParamsDataUnion] `json:"data,required"`
// 游戏唯一标识,pkm, ygo,pocket 等
GameKey param.Field[string] `json:"game_key,required"`
// 卡牌图片描述,如卡牌封面,卡牌背面
Images param.Field[[]shared.I18nImageParam] `json:"images,required"`
// 分类,card 和 goods
Kind param.Field[string] `json:"kind,required"`
// 卡牌语言,zh-TW, zh-CN 等
Language param.Field[string] `json:"language,required"`
// 卡牌名字
Name param.Field[string] `json:"name,required"`
// 卡牌编号
Number param.Field[string] `json:"number,required"`
// 发布时间
PublishedAt param.Field[time.Time] `json:"published_at,required" format:"date-time"`
// 区域,数字编码
Region param.Field[[]string] `json:"region,required"`
// 所属集合,如果传为空,则不修改,如果传了则为全量更新
CollectionUuids param.Field[[]string] `json:"collection_uuids"`
// 是否缺失
HasMissing param.Field[bool] `json:"has_missing"`
// 是否隐藏
IsHidden param.Field[bool] `json:"is_hidden"`
IsPublished param.Field[bool] `json:"is_published"`
// spu uuid,如果没传则自动根据当前 sku 信息创建一个新的 spu,否则关联指定 spu_uuid
SpuUuid param.Field[string] `json:"spu_uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUNewParams) MarshalJSON ¶
func (r ProductSKUNewParams) MarshalJSON() (data []byte, err error)
type ProductSKUNewParamsDataArray ¶
type ProductSKUNewParamsDataArray []interface{}
func (ProductSKUNewParamsDataArray) ImplementsProductSKUNewParamsDataUnion ¶
func (r ProductSKUNewParamsDataArray) ImplementsProductSKUNewParamsDataUnion()
type ProductSKUNewParamsDataMap ¶
type ProductSKUNewParamsDataMap map[string]interface{}
func (ProductSKUNewParamsDataMap) ImplementsProductSKUNewParamsDataUnion ¶
func (r ProductSKUNewParamsDataMap) ImplementsProductSKUNewParamsDataUnion()
type ProductSKUNewParamsDataUnion ¶
type ProductSKUNewParamsDataUnion interface {
ImplementsProductSKUNewParamsDataUnion()
}
不同游戏结构不同,具体参考"字段描述"文档
Satisfied by shared.UnionString, shared.UnionBool, ProductSKUNewParamsDataArray, ProductSKUNewParamsDataMap, shared.UnionFloat.
type ProductSKUNewResponse ¶
type ProductSKUNewResponse struct {
Code int64 `json:"code,required"`
Data ProductSKUNewResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUNewResponseJSON `json:"-"`
}
func (*ProductSKUNewResponse) UnmarshalJSON ¶
func (r *ProductSKUNewResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUNewResponseData ¶
type ProductSKUNewResponseData struct {
Uuid string `json:"uuid,required" format:"uuid"`
JSON productSKUNewResponseDataJSON `json:"-"`
}
func (*ProductSKUNewResponseData) UnmarshalJSON ¶
func (r *ProductSKUNewResponseData) UnmarshalJSON(data []byte) (err error)
type ProductSKUPublishParams ¶
type ProductSKUPublishParams struct {
Uuid param.Field[string] `json:"uuid,required" format:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUPublishParams) MarshalJSON ¶
func (r ProductSKUPublishParams) MarshalJSON() (data []byte, err error)
type ProductSKUPublishResponse ¶
type ProductSKUPublishResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUPublishResponseJSON `json:"-"`
}
func (*ProductSKUPublishResponse) UnmarshalJSON ¶
func (r *ProductSKUPublishResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKURelationByCvidParams ¶
type ProductSKURelationByCvidParams struct {
// card version ids 列表,批量查询
ID param.Field[[]int64] `query:"id,required"`
GameKey param.Field[string] `query:"game_key"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKURelationByCvidParams) URLQuery ¶
func (r ProductSKURelationByCvidParams) URLQuery() (v url.Values)
URLQuery serializes ProductSKURelationByCvidParams's query parameters as `url.Values`.
type ProductSKURelationByCvidResponse ¶
type ProductSKURelationByCvidResponse struct {
Code int64 `json:"code,required"`
Data []TempCardSKURelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKURelationByCvidResponseJSON `json:"-"`
}
func (*ProductSKURelationByCvidResponse) UnmarshalJSON ¶
func (r *ProductSKURelationByCvidResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKURelationByCvidSearchParams ¶
type ProductSKURelationByCvidSearchParams struct {
// 游戏 key,可以为空
GameKey param.Field[string] `json:"game_key,required"`
IDs param.Field[[]int64] `json:"ids,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKURelationByCvidSearchParams) MarshalJSON ¶
func (r ProductSKURelationByCvidSearchParams) MarshalJSON() (data []byte, err error)
type ProductSKURelationByCvidSearchResponse ¶
type ProductSKURelationByCvidSearchResponse struct {
Code int64 `json:"code,required"`
Data []TempCardSKURelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKURelationByCvidSearchResponseJSON `json:"-"`
}
func (*ProductSKURelationByCvidSearchResponse) UnmarshalJSON ¶
func (r *ProductSKURelationByCvidSearchResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKURelationByUuidParams ¶
type ProductSKURelationByUuidParams struct {
// sku uuids 列表,批量查询
Uuid param.Field[[]string] `query:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKURelationByUuidParams) URLQuery ¶
func (r ProductSKURelationByUuidParams) URLQuery() (v url.Values)
URLQuery serializes ProductSKURelationByUuidParams's query parameters as `url.Values`.
type ProductSKURelationByUuidResponse ¶
type ProductSKURelationByUuidResponse struct {
Code int64 `json:"code,required"`
Data []TempCardSKURelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKURelationByUuidResponseJSON `json:"-"`
}
func (*ProductSKURelationByUuidResponse) UnmarshalJSON ¶
func (r *ProductSKURelationByUuidResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKURelationByUuidSearchParams ¶
type ProductSKURelationByUuidSearchParams struct {
Uuids param.Field[[]string] `json:"uuids,required" format:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKURelationByUuidSearchParams) MarshalJSON ¶
func (r ProductSKURelationByUuidSearchParams) MarshalJSON() (data []byte, err error)
type ProductSKURelationByUuidSearchResponse ¶
type ProductSKURelationByUuidSearchResponse struct {
Code int64 `json:"code,required"`
Data []TempCardSKURelation `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKURelationByUuidSearchResponseJSON `json:"-"`
}
func (*ProductSKURelationByUuidSearchResponse) UnmarshalJSON ¶
func (r *ProductSKURelationByUuidSearchResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUSearchParams ¶
type ProductSKUSearchParams struct {
Page param.Field[int64] `query:"page"`
PageSize param.Field[int64] `query:"page_size"`
// 所属集合 uuid
CollectionUuid param.Field[[]string] `json:"collection_uuid"`
// 游戏标识
GameKey param.Field[string] `json:"game_key"`
// 是否缺失
HasMissing param.Field[bool] `json:"has_missing"`
// 是否隐藏
IsHidden param.Field[bool] `json:"is_hidden"`
// 多语言
IsMultiLanguage param.Field[bool] `json:"is_multi_language"`
// 是否发布
IsPublished param.Field[bool] `json:"is_published"`
// sku 类型
Kind param.Field[ProductSKUSearchParamsKind] `json:"kind"`
// 卡牌语言
Language param.Field[string] `json:"language"`
// 卡牌名
Name param.Field[string] `json:"name"`
// 卡牌编号
Number param.Field[string] `json:"number"`
Orders param.Field[[]ProductSKUSearchParamsOrder] `json:"orders"`
// 罕贵度
Rarity param.Field[string] `json:"rarity"`
// 指定 spu
SpuUuid param.Field[string] `json:"spu_uuid"`
// uuids 列表
Uuids param.Field[[]string] `json:"uuids"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUSearchParams) MarshalJSON ¶
func (r ProductSKUSearchParams) MarshalJSON() (data []byte, err error)
func (ProductSKUSearchParams) URLQuery ¶
func (r ProductSKUSearchParams) URLQuery() (v url.Values)
URLQuery serializes ProductSKUSearchParams's query parameters as `url.Values`.
type ProductSKUSearchParamsKind ¶
type ProductSKUSearchParamsKind string
sku 类型
const ( ProductSKUSearchParamsKindGoods ProductSKUSearchParamsKind = "goods" ProductSKUSearchParamsKindCard ProductSKUSearchParamsKind = "card" )
func (ProductSKUSearchParamsKind) IsKnown ¶
func (r ProductSKUSearchParamsKind) IsKnown() bool
type ProductSKUSearchParamsOrder ¶
type ProductSKUSearchParamsOrder string
const ( ProductSKUSearchParamsOrderUuidDesc ProductSKUSearchParamsOrder = "uuid desc" ProductSKUSearchParamsOrderUuidAsc ProductSKUSearchParamsOrder = "uuid asc" ProductSKUSearchParamsOrderKindDesc ProductSKUSearchParamsOrder = "kind desc" ProductSKUSearchParamsOrderKindAsc ProductSKUSearchParamsOrder = "kind asc" ProductSKUSearchParamsOrderNumberDesc ProductSKUSearchParamsOrder = "number desc" ProductSKUSearchParamsOrderNumberAsc ProductSKUSearchParamsOrder = "number asc" ProductSKUSearchParamsOrderRarityDesc ProductSKUSearchParamsOrder = "rarity desc" ProductSKUSearchParamsOrderRarityAsc ProductSKUSearchParamsOrder = "rarity asc" ProductSKUSearchParamsOrderFinishDesc ProductSKUSearchParamsOrder = "finish desc" ProductSKUSearchParamsOrderFinishAsc ProductSKUSearchParamsOrder = "finish asc" ProductSKUSearchParamsOrderPublishedAtDesc ProductSKUSearchParamsOrder = "published_at desc" ProductSKUSearchParamsOrderPublishedAtAsc ProductSKUSearchParamsOrder = "published_at asc" )
func (ProductSKUSearchParamsOrder) IsKnown ¶
func (r ProductSKUSearchParamsOrder) IsKnown() bool
type ProductSKUService ¶
type ProductSKUService struct {
Options []option.RequestOption
}
ProductSKUService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductSKUService method instead.
func NewProductSKUService ¶
func NewProductSKUService(opts ...option.RequestOption) (r *ProductSKUService)
NewProductSKUService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProductSKUService) Delete ¶
func (r *ProductSKUService) Delete(ctx context.Context, params ProductSKUDeleteParams, opts ...option.RequestOption) (res *ProductSKUDeleteResponse, err error)
删除 sku
func (*ProductSKUService) Get ¶
func (r *ProductSKUService) Get(ctx context.Context, params ProductSKUGetParams, opts ...option.RequestOption) (res *ProductSKUGetResponse, err error)
获取 sku 详情
func (*ProductSKUService) GetMany ¶
func (r *ProductSKUService) GetMany(ctx context.Context, params ProductSKUGetManyParams, opts ...option.RequestOption) (res *ProductSKUGetManyResponse, err error)
批量获取 sku 详情
func (*ProductSKUService) GetManySearch ¶
func (r *ProductSKUService) GetManySearch(ctx context.Context, params ProductSKUGetManySearchParams, opts ...option.RequestOption) (res *ProductSKUGetManySearchResponse, err error)
批量获取 sku 详情
func (*ProductSKUService) List ¶
func (r *ProductSKUService) List(ctx context.Context, params ProductSKUListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[SKU], err error)
获取 sku 列表 Copy
func (*ProductSKUService) ListAutoPaging ¶
func (r *ProductSKUService) ListAutoPaging(ctx context.Context, params ProductSKUListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[SKU]
获取 sku 列表 Copy
func (*ProductSKUService) Merge ¶
func (r *ProductSKUService) Merge(ctx context.Context, params ProductSKUMergeParams, opts ...option.RequestOption) (res *ProductSKUMergeResponse, err error)
合并 sku
func (*ProductSKUService) MergeRelation ¶
func (r *ProductSKUService) MergeRelation(ctx context.Context, params ProductSKUMergeRelationParams, opts ...option.RequestOption) (res *ProductSKUMergeRelationResponse, err error)
查找被合并的 SKU
func (*ProductSKUService) New ¶
func (r *ProductSKUService) New(ctx context.Context, params ProductSKUNewParams, opts ...option.RequestOption) (res *ProductSKUNewResponse, err error)
创建 sku
func (*ProductSKUService) Publish ¶
func (r *ProductSKUService) Publish(ctx context.Context, params ProductSKUPublishParams, opts ...option.RequestOption) (res *ProductSKUPublishResponse, err error)
发布 sku
func (*ProductSKUService) RelationByCvid ¶
func (r *ProductSKUService) RelationByCvid(ctx context.Context, params ProductSKURelationByCvidParams, opts ...option.RequestOption) (res *ProductSKURelationByCvidResponse, err error)
根据 card version id 批量获取关系
func (*ProductSKUService) RelationByCvidSearch ¶
func (r *ProductSKUService) RelationByCvidSearch(ctx context.Context, params ProductSKURelationByCvidSearchParams, opts ...option.RequestOption) (res *ProductSKURelationByCvidSearchResponse, err error)
根据 card version id 批量获取关系
func (*ProductSKUService) RelationByUuid ¶
func (r *ProductSKUService) RelationByUuid(ctx context.Context, params ProductSKURelationByUuidParams, opts ...option.RequestOption) (res *ProductSKURelationByUuidResponse, err error)
根据 sku uuid 获取关系
func (*ProductSKUService) RelationByUuidSearch ¶
func (r *ProductSKUService) RelationByUuidSearch(ctx context.Context, params ProductSKURelationByUuidSearchParams, opts ...option.RequestOption) (res *ProductSKURelationByUuidSearchResponse, err error)
根据 sku uuid 获取关系
func (*ProductSKUService) Search ¶
func (r *ProductSKUService) Search(ctx context.Context, params ProductSKUSearchParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[SKU], err error)
获取 sku 列表
func (*ProductSKUService) SearchAutoPaging ¶
func (r *ProductSKUService) SearchAutoPaging(ctx context.Context, params ProductSKUSearchParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[SKU]
获取 sku 列表
func (*ProductSKUService) Update ¶
func (r *ProductSKUService) Update(ctx context.Context, params ProductSKUUpdateParams, opts ...option.RequestOption) (res *ProductSKUUpdateResponse, err error)
更新 sku
func (*ProductSKUService) UpdateImages ¶
func (r *ProductSKUService) UpdateImages(ctx context.Context, params ProductSKUUpdateImagesParams, opts ...option.RequestOption) (res *ProductSKUUpdateImagesResponse, err error)
更新 sku Images
func (*ProductSKUService) UpdateName ¶
func (r *ProductSKUService) UpdateName(ctx context.Context, params ProductSKUUpdateNameParams, opts ...option.RequestOption) (res *ProductSKUUpdateNameResponse, err error)
更新 sku Name
type ProductSKUUpdateImagesParams ¶
type ProductSKUUpdateImagesParams struct {
// 新的图片
Images param.Field[[]shared.I18nImageParam] `json:"images,required"`
// sku uuid
Uuid param.Field[string] `json:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUUpdateImagesParams) MarshalJSON ¶
func (r ProductSKUUpdateImagesParams) MarshalJSON() (data []byte, err error)
type ProductSKUUpdateImagesResponse ¶
type ProductSKUUpdateImagesResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUUpdateImagesResponseJSON `json:"-"`
}
func (*ProductSKUUpdateImagesResponse) UnmarshalJSON ¶
func (r *ProductSKUUpdateImagesResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUUpdateNameParams ¶
type ProductSKUUpdateNameParams struct {
// 新的卡名
Name param.Field[string] `json:"name,required"`
// sku uuid
Uuid param.Field[string] `json:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUUpdateNameParams) MarshalJSON ¶
func (r ProductSKUUpdateNameParams) MarshalJSON() (data []byte, err error)
type ProductSKUUpdateNameResponse ¶
type ProductSKUUpdateNameResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUUpdateNameResponseJSON `json:"-"`
}
func (*ProductSKUUpdateNameResponse) UnmarshalJSON ¶
func (r *ProductSKUUpdateNameResponse) UnmarshalJSON(data []byte) (err error)
type ProductSKUUpdateParams ¶
type ProductSKUUpdateParams struct {
// 卡牌别名数组
Aliases param.Field[[]string] `json:"aliases,required"`
// 不同游戏结构不同,具体参考"字段描述"文档
Data param.Field[ProductSKUUpdateParamsDataUnion] `json:"data,required"`
// 游戏唯一标识,pkm, ygo,pocket 等
GameKey param.Field[string] `json:"game_key,required"`
// 卡牌图片描述,如卡牌封面,卡牌背面
Images param.Field[[]shared.I18nImageParam] `json:"images,required"`
// 分类,card 和 goods
Kind param.Field[string] `json:"kind,required"`
// 卡牌语言,zh-TW, zh-CN 等
Language param.Field[string] `json:"language,required"`
// 卡牌名字
Name param.Field[string] `json:"name,required"`
// 卡牌编号
Number param.Field[string] `json:"number,required"`
// 发布时间
PublishedAt param.Field[time.Time] `json:"published_at,required" format:"date-time"`
// 区域,数字编码
Region param.Field[[]string] `json:"region,required"`
Uuid param.Field[string] `json:"uuid,required" format:"uuid"`
// 所属集合,如果传为空,则不修改,如果传了则为全量更新
CollectionUuids param.Field[[]string] `json:"collection_uuids"`
// 是否缺失
HasMissing param.Field[bool] `json:"has_missing"`
// 是否隐藏
IsHidden param.Field[bool] `json:"is_hidden"`
IsPublished param.Field[bool] `json:"is_published"`
// spu uuid,如果没传则自动根据当前 sku 信息创建一个新的 spu,否则关联指定 spu_uuid
SpuUuid param.Field[string] `json:"spu_uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSKUUpdateParams) MarshalJSON ¶
func (r ProductSKUUpdateParams) MarshalJSON() (data []byte, err error)
type ProductSKUUpdateParamsDataArray ¶
type ProductSKUUpdateParamsDataArray []interface{}
func (ProductSKUUpdateParamsDataArray) ImplementsProductSKUUpdateParamsDataUnion ¶
func (r ProductSKUUpdateParamsDataArray) ImplementsProductSKUUpdateParamsDataUnion()
type ProductSKUUpdateParamsDataMap ¶
type ProductSKUUpdateParamsDataMap map[string]interface{}
func (ProductSKUUpdateParamsDataMap) ImplementsProductSKUUpdateParamsDataUnion ¶
func (r ProductSKUUpdateParamsDataMap) ImplementsProductSKUUpdateParamsDataUnion()
type ProductSKUUpdateParamsDataUnion ¶
type ProductSKUUpdateParamsDataUnion interface {
ImplementsProductSKUUpdateParamsDataUnion()
}
不同游戏结构不同,具体参考"字段描述"文档
Satisfied by shared.UnionString, shared.UnionBool, ProductSKUUpdateParamsDataArray, ProductSKUUpdateParamsDataMap, shared.UnionFloat.
type ProductSKUUpdateResponse ¶
type ProductSKUUpdateResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSKUUpdateResponseJSON `json:"-"`
}
func (*ProductSKUUpdateResponse) UnmarshalJSON ¶
func (r *ProductSKUUpdateResponse) UnmarshalJSON(data []byte) (err error)
type ProductService ¶
type ProductService struct {
Options []option.RequestOption
SKUs *ProductSKUService
Spus *ProductSpusService
}
ProductService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductService method instead.
func NewProductService ¶
func NewProductService(opts ...option.RequestOption) (r *ProductService)
NewProductService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ProductSpusGetParams ¶
type ProductSpusGetParams struct {
// spu uuid
Uuid param.Field[string] `query:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSpusGetParams) URLQuery ¶
func (r ProductSpusGetParams) URLQuery() (v url.Values)
URLQuery serializes ProductSpusGetParams's query parameters as `url.Values`.
type ProductSpusGetResponse ¶
type ProductSpusGetResponse struct {
Code int64 `json:"code,required"`
Data Spu `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSpusGetResponseJSON `json:"-"`
}
func (*ProductSpusGetResponse) UnmarshalJSON ¶
func (r *ProductSpusGetResponse) UnmarshalJSON(data []byte) (err error)
type ProductSpusListParams ¶
type ProductSpusListParams struct {
// 游戏标识
GameKey param.Field[string] `query:"game_key"`
// 过滤缺失或未缺失数据的卡牌
HasMissing param.Field[bool] `query:"has_missing"`
// 过滤已隐藏或未隐藏的卡牌
IsHidden param.Field[bool] `query:"is_hidden"`
// 过滤已发布或未发布的卡牌
IsPublished param.Field[bool] `query:"is_published"`
// 分类,card 和 goods
Kind param.Field[ProductSpusListParamsKind] `query:"kind"`
// spu 名字
Name param.Field[string] `query:"name"`
// 页码
Page param.Field[int64] `query:"page"`
// 每页条数
PageSize param.Field[int64] `query:"page_size"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSpusListParams) URLQuery ¶
func (r ProductSpusListParams) URLQuery() (v url.Values)
URLQuery serializes ProductSpusListParams's query parameters as `url.Values`.
type ProductSpusListParamsKind ¶
type ProductSpusListParamsKind string
分类,card 和 goods
const ( ProductSpusListParamsKindCard ProductSpusListParamsKind = "card" ProductSpusListParamsKindGoods ProductSpusListParamsKind = "goods" )
func (ProductSpusListParamsKind) IsKnown ¶
func (r ProductSpusListParamsKind) IsKnown() bool
type ProductSpusOriginParams ¶
type ProductSpusOriginParams struct {
// spu uuid
Uuid param.Field[string] `query:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSpusOriginParams) URLQuery ¶
func (r ProductSpusOriginParams) URLQuery() (v url.Values)
URLQuery serializes ProductSpusOriginParams's query parameters as `url.Values`.
type ProductSpusOriginResponse ¶
type ProductSpusOriginResponse struct {
Code int64 `json:"code,required"`
Data ProductSpusOriginResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id"`
JSON productSpusOriginResponseJSON `json:"-"`
}
func (*ProductSpusOriginResponse) UnmarshalJSON ¶
func (r *ProductSpusOriginResponse) UnmarshalJSON(data []byte) (err error)
type ProductSpusOriginResponseData ¶
type ProductSpusOriginResponseData struct {
// 实际被合并进 spu 的 sku 信息
Origin []SKU `json:"origin,required"`
// spu 关联的所有 sku 信息
SKUs []SKU `json:"skus,required"`
// spu 详情
Spu Spu `json:"spu,required"`
JSON productSpusOriginResponseDataJSON `json:"-"`
}
func (*ProductSpusOriginResponseData) UnmarshalJSON ¶
func (r *ProductSpusOriginResponseData) UnmarshalJSON(data []byte) (err error)
type ProductSpusService ¶
type ProductSpusService struct {
Options []option.RequestOption
}
ProductSpusService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProductSpusService method instead.
func NewProductSpusService ¶
func NewProductSpusService(opts ...option.RequestOption) (r *ProductSpusService)
NewProductSpusService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProductSpusService) Get ¶
func (r *ProductSpusService) Get(ctx context.Context, params ProductSpusGetParams, opts ...option.RequestOption) (res *ProductSpusGetResponse, err error)
获取 spu 详情
func (*ProductSpusService) List ¶
func (r *ProductSpusService) List(ctx context.Context, params ProductSpusListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[Spu], err error)
获取 spu 列表
func (*ProductSpusService) ListAutoPaging ¶
func (r *ProductSpusService) ListAutoPaging(ctx context.Context, params ProductSpusListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[Spu]
获取 spu 列表
func (*ProductSpusService) Origin ¶
func (r *ProductSpusService) Origin(ctx context.Context, params ProductSpusOriginParams, opts ...option.RequestOption) (res *ProductSpusOriginResponse, err error)
获取 SPU 数据来源
func (*ProductSpusService) Update ¶
func (r *ProductSpusService) Update(ctx context.Context, params ProductSpusUpdateParams, opts ...option.RequestOption) (res *ProductSpusUpdateResponse, err error)
更新 spu
type ProductSpusUpdateParams ¶
type ProductSpusUpdateParams struct {
I18nData param.Field[[]ProductSpusUpdateParamsI18nData] `json:"i18n_data,required"`
Kind param.Field[ProductSpusUpdateParamsKind] `json:"kind,required"`
Name param.Field[string] `json:"name,required"`
QaUuids param.Field[[]string] `json:"qa_uuids,required" format:"uuid"`
Uuid param.Field[string] `json:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (ProductSpusUpdateParams) MarshalJSON ¶
func (r ProductSpusUpdateParams) MarshalJSON() (data []byte, err error)
type ProductSpusUpdateParamsI18nData ¶
type ProductSpusUpdateParamsI18nData struct {
Language param.Field[string] `json:"language,required"`
// 不同游戏结构不同,具体参考"字段描述"文档
Text param.Field[map[string]interface{}] `json:"text,required"`
Translator param.Field[string] `json:"translator,required"`
}
func (ProductSpusUpdateParamsI18nData) MarshalJSON ¶
func (r ProductSpusUpdateParamsI18nData) MarshalJSON() (data []byte, err error)
type ProductSpusUpdateParamsKind ¶
type ProductSpusUpdateParamsKind string
const ( ProductSpusUpdateParamsKindCard ProductSpusUpdateParamsKind = "card" ProductSpusUpdateParamsKindGoods ProductSpusUpdateParamsKind = "goods" )
func (ProductSpusUpdateParamsKind) IsKnown ¶
func (r ProductSpusUpdateParamsKind) IsKnown() bool
type ProductSpusUpdateResponse ¶
type ProductSpusUpdateResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON productSpusUpdateResponseJSON `json:"-"`
}
func (*ProductSpusUpdateResponse) UnmarshalJSON ¶
func (r *ProductSpusUpdateResponse) UnmarshalJSON(data []byte) (err error)
type QaDeleteParams ¶
type QaDeleteParams struct {
Uuid param.Field[string] `json:"uuid,required" format:"uuid"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (QaDeleteParams) MarshalJSON ¶
func (r QaDeleteParams) MarshalJSON() (data []byte, err error)
type QaDeleteResponse ¶
type QaDeleteResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON qaDeleteResponseJSON `json:"-"`
}
func (*QaDeleteResponse) UnmarshalJSON ¶
func (r *QaDeleteResponse) UnmarshalJSON(data []byte) (err error)
type QaGetParams ¶
type QaGetParams struct {
// QA 主键
Uuid param.Field[string] `query:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (QaGetParams) URLQuery ¶
func (r QaGetParams) URLQuery() (v url.Values)
URLQuery serializes QaGetParams's query parameters as `url.Values`.
type QaGetResponse ¶
type QaGetResponse struct {
Code int64 `json:"code,required"`
// 问答判例对象
Data QaGetResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON qaGetResponseJSON `json:"-"`
}
func (*QaGetResponse) UnmarshalJSON ¶
func (r *QaGetResponse) UnmarshalJSON(data []byte) (err error)
type QaGetResponseData ¶
type QaGetResponseData struct {
// 创建时间
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// 关联的游戏
GameKey string `json:"game_key,required"`
// 答案多语言
I18nAnswers []shared.I18n `json:"i18n_answers,required"`
// 问题多语言
I18nQuestions []shared.I18n `json:"i18n_questions,required"`
// 问题标题多语言
I18nTitles []shared.I18n `json:"i18n_titles,required"`
Kind QaGetResponseDataKind `json:"kind,required"`
// 更新时间
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// 问答判例 UUID
Uuid string `json:"uuid,required" format:"uuid"`
// 判例的官方显示更新时间
PublishedAt time.Time `json:"published_at,nullable" format:"date-time"`
// 判例链接
URL string `json:"url"`
JSON qaGetResponseDataJSON `json:"-"`
}
问答判例对象
func (*QaGetResponseData) UnmarshalJSON ¶
func (r *QaGetResponseData) UnmarshalJSON(data []byte) (err error)
type QaGetResponseDataKind ¶
type QaGetResponseDataKind string
const ( QaGetResponseDataKindQa QaGetResponseDataKind = "qa" QaGetResponseDataKindAdjustment QaGetResponseDataKind = "adjustment" QaGetResponseDataKindRulings QaGetResponseDataKind = "rulings" )
func (QaGetResponseDataKind) IsKnown ¶
func (r QaGetResponseDataKind) IsKnown() bool
type QaListParams ¶
type QaListParams struct {
// game_key 过滤
GameKey param.Field[string] `query:"game_key"`
// 页码,默认为 1
Page param.Field[int64] `query:"page"`
// 每页数量,默认 50,最大 200
PageSize param.Field[int64] `query:"page_size"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (QaListParams) URLQuery ¶
func (r QaListParams) URLQuery() (v url.Values)
URLQuery serializes QaListParams's query parameters as `url.Values`.
type QaListResponse ¶
type QaListResponse struct {
// 创建时间
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// 关联的游戏
GameKey string `json:"game_key,required"`
// 答案多语言
I18nAnswers []shared.I18n `json:"i18n_answers,required"`
// 问题多语言
I18nQuestions []shared.I18n `json:"i18n_questions,required"`
// 问题标题多语言
I18nTitles []shared.I18n `json:"i18n_titles,required"`
Kind QaListResponseKind `json:"kind,required"`
// 更新时间
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// 问答判例 UUID
Uuid string `json:"uuid,required" format:"uuid"`
// 判例的官方显示更新时间
PublishedAt time.Time `json:"published_at,nullable" format:"date-time"`
// 判例链接
URL string `json:"url"`
JSON qaListResponseJSON `json:"-"`
}
问答判例对象
func (*QaListResponse) UnmarshalJSON ¶
func (r *QaListResponse) UnmarshalJSON(data []byte) (err error)
type QaListResponseKind ¶
type QaListResponseKind string
const ( QaListResponseKindQa QaListResponseKind = "qa" QaListResponseKindAdjustment QaListResponseKind = "adjustment" QaListResponseKindRulings QaListResponseKind = "rulings" )
func (QaListResponseKind) IsKnown ¶
func (r QaListResponseKind) IsKnown() bool
type QaNewParams ¶
type QaNewParams struct {
GameKey param.Field[string] `json:"game_key,required"`
I18nAnswers param.Field[[]shared.I18nParam] `json:"i18n_answers,required"`
I18nQuestions param.Field[[]shared.I18nParam] `json:"i18n_questions,required"`
I18nTitles param.Field[[]shared.I18nParam] `json:"i18n_titles,required"`
Kind param.Field[QaNewParamsKind] `json:"kind,required"`
// null 代表未知
PublishedAt param.Field[time.Time] `json:"published_at" format:"date-time"`
URL param.Field[string] `json:"url"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (QaNewParams) MarshalJSON ¶
func (r QaNewParams) MarshalJSON() (data []byte, err error)
type QaNewParamsKind ¶
type QaNewParamsKind string
const ( QaNewParamsKindQa QaNewParamsKind = "qa" QaNewParamsKindAdjustment QaNewParamsKind = "adjustment" QaNewParamsKindRulings QaNewParamsKind = "rulings" )
func (QaNewParamsKind) IsKnown ¶
func (r QaNewParamsKind) IsKnown() bool
type QaNewResponse ¶
type QaNewResponse struct {
Code int64 `json:"code,required"`
Data QaNewResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON qaNewResponseJSON `json:"-"`
}
func (*QaNewResponse) UnmarshalJSON ¶
func (r *QaNewResponse) UnmarshalJSON(data []byte) (err error)
type QaNewResponseData ¶
type QaNewResponseData struct {
Uuid string `json:"uuid,required" format:"uuid"`
JSON qaNewResponseDataJSON `json:"-"`
}
func (*QaNewResponseData) UnmarshalJSON ¶
func (r *QaNewResponseData) UnmarshalJSON(data []byte) (err error)
type QaService ¶
type QaService struct {
Options []option.RequestOption
}
QaService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQaService method instead.
func NewQaService ¶
func NewQaService(opts ...option.RequestOption) (r *QaService)
NewQaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*QaService) Delete ¶
func (r *QaService) Delete(ctx context.Context, params QaDeleteParams, opts ...option.RequestOption) (res *QaDeleteResponse, err error)
根据 UUID 删除问答判例
func (*QaService) Get ¶
func (r *QaService) Get(ctx context.Context, params QaGetParams, opts ...option.RequestOption) (res *QaGetResponse, err error)
获取问答判例详情
func (*QaService) List ¶
func (r *QaService) List(ctx context.Context, params QaListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[QaListResponse], err error)
根据过滤条件获取问答判例列表,支持分页
func (*QaService) ListAutoPaging ¶
func (r *QaService) ListAutoPaging(ctx context.Context, params QaListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[QaListResponse]
根据过滤条件获取问答判例列表,支持分页
func (*QaService) New ¶
func (r *QaService) New(ctx context.Context, params QaNewParams, opts ...option.RequestOption) (res *QaNewResponse, err error)
创建新的问答判例
func (*QaService) Update ¶
func (r *QaService) Update(ctx context.Context, params QaUpdateParams, opts ...option.RequestOption) (res *QaUpdateResponse, err error)
更新判例
type QaUpdateParams ¶
type QaUpdateParams struct {
GameKey param.Field[string] `json:"game_key,required"`
I18nAnswers param.Field[[]shared.I18nParam] `json:"i18n_answers,required"`
I18nQuestions param.Field[[]shared.I18nParam] `json:"i18n_questions,required"`
I18nTitles param.Field[[]shared.I18nParam] `json:"i18n_titles,required"`
Kind param.Field[QaUpdateParamsKind] `json:"kind,required"`
Uuid param.Field[string] `json:"uuid,required" format:"uuid"`
// null 代表未知
PublishedAt param.Field[time.Time] `json:"published_at" format:"date-time"`
URL param.Field[string] `json:"url"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (QaUpdateParams) MarshalJSON ¶
func (r QaUpdateParams) MarshalJSON() (data []byte, err error)
type QaUpdateParamsKind ¶
type QaUpdateParamsKind string
const ( QaUpdateParamsKindQa QaUpdateParamsKind = "qa" QaUpdateParamsKindAdjustment QaUpdateParamsKind = "adjustment" QaUpdateParamsKindRulings QaUpdateParamsKind = "rulings" )
func (QaUpdateParamsKind) IsKnown ¶
func (r QaUpdateParamsKind) IsKnown() bool
type QaUpdateResponse ¶
type QaUpdateResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON qaUpdateResponseJSON `json:"-"`
}
func (*QaUpdateResponse) UnmarshalJSON ¶
func (r *QaUpdateResponse) UnmarshalJSON(data []byte) (err error)
type SKU ¶
type SKU struct {
// 该卡所属的集合
Collections []shared.Collection `json:"collections,required"`
// 记录创建时间
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// 不同游戏结构不一样,详细参
// 考https://c1t2ed3gem.feishu.cn/wiki/PiTUwdwNbibqyukygjLcdRlpn6c?table=tbliqPTKMnXhFome&view=vewJ9UnMCE
Data SKUDataUnion `json:"data,required,nullable"`
// 游戏 game_key
GameKey string `json:"game_key,required"`
// 是否有缺失数据
HasMissing bool `json:"has_missing,required"`
// spu 上的多语言信息
I18nData []Skui18nDataUnion `json:"i18n_data,required,nullable"`
// 是否隐藏
IsHidden bool `json:"is_hidden,required"`
// 是否发布
IsPublished bool `json:"is_published,required"`
// sku 类型,goods 或者 card
Kind SKUKind `json:"kind,required"`
// 卡牌语言
Language SKULanguage `json:"language,required"`
// 卡牌名称
Name string `json:"name,required"`
// 卡牌 number
Number string `json:"number,required"`
// 发行地区
Region []string `json:"region,required"`
// 当前数据所使用的 schema uuid
SchemaUuid string `json:"schema_uuid,required" format:"uuid"`
// 关联的 spu uuids
SpuUuid string `json:"spu_uuid,required"`
// 记录最近更新时间
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
// sku uuid
Uuid string `json:"uuid,required"`
// 别名,搜索使用
Aliases []string `json:"aliases"`
// sku 扩展数据
Extra SKUExtra `json:"extra"`
// 卡图列表
Images []shared.I18nImage `json:"images"`
// 卡牌发布时间
PublishedAt time.Time `json:"published_at,nullable" format:"date-time"`
JSON skuJSON `json:"-"`
}
func (*SKU) UnmarshalJSON ¶
type SKUDataArray ¶
type SKUDataArray []interface{}
func (SKUDataArray) ImplementsSKUDataUnion ¶
func (r SKUDataArray) ImplementsSKUDataUnion()
type SKUDataMap ¶
type SKUDataMap map[string]interface{}
func (SKUDataMap) ImplementsSKUDataUnion ¶
func (r SKUDataMap) ImplementsSKUDataUnion()
type SKUDataUnion ¶
type SKUDataUnion interface {
ImplementsSKUDataUnion()
}
不同游戏结构不一样,详细参 考https://c1t2ed3gem.feishu.cn/wiki/PiTUwdwNbibqyukygjLcdRlpn6c?table=tbliqPTKMnXhFome&view=vewJ9UnMCE
Union satisfied by shared.UnionString, shared.UnionBool, SKUDataArray, SKUDataMap or shared.UnionFloat.
type SKUExtra ¶
type SKUExtra struct {
// spu 的别名
SpuAliases []string `json:"spu_aliases"`
JSON skuExtraJSON `json:"-"`
}
sku 扩展数据
func (*SKUExtra) UnmarshalJSON ¶
type SKUI18nDataArray ¶
type SKUI18nDataArray []interface{}
func (SKUI18nDataArray) ImplementsSkui18nDataUnion ¶
func (r SKUI18nDataArray) ImplementsSkui18nDataUnion()
type SKUI18nDataMap ¶
type SKUI18nDataMap map[string]interface{}
func (SKUI18nDataMap) ImplementsSkui18nDataUnion ¶
func (r SKUI18nDataMap) ImplementsSkui18nDataUnion()
type SKULanguage ¶
type SKULanguage string
卡牌语言
const ( SKULanguageZhCn SKULanguage = "zh-CN" SKULanguageZhTw SKULanguage = "zh-TW" SKULanguageJaJp SKULanguage = "ja-JP" SKULanguageEnUs SKULanguage = "en-US" )
func (SKULanguage) IsKnown ¶
func (r SKULanguage) IsKnown() bool
type SchemaGetParams ¶
type SchemaGetParams struct {
Uuid param.Field[string] `query:"uuid,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SchemaGetParams) URLQuery ¶
func (r SchemaGetParams) URLQuery() (v url.Values)
URLQuery serializes SchemaGetParams's query parameters as `url.Values`.
type SchemaGetResponse ¶
type SchemaGetResponse struct {
Code int64 `json:"code,required"`
Data SchemaGetResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON schemaGetResponseJSON `json:"-"`
}
func (*SchemaGetResponse) UnmarshalJSON ¶
func (r *SchemaGetResponse) UnmarshalJSON(data []byte) (err error)
type SchemaGetResponseData ¶
type SchemaGetResponseData struct {
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Data SchemaGetResponseDataDataUnion `json:"data,required,nullable"`
GameKey string `json:"game_key,required"`
Name string `json:"name,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
Uuid string `json:"uuid,required" format:"uuid"`
JSON schemaGetResponseDataJSON `json:"-"`
}
func (*SchemaGetResponseData) UnmarshalJSON ¶
func (r *SchemaGetResponseData) UnmarshalJSON(data []byte) (err error)
type SchemaGetResponseDataDataArray ¶
type SchemaGetResponseDataDataArray []interface{}
func (SchemaGetResponseDataDataArray) ImplementsSchemaGetResponseDataDataUnion ¶
func (r SchemaGetResponseDataDataArray) ImplementsSchemaGetResponseDataDataUnion()
type SchemaGetResponseDataDataMap ¶
type SchemaGetResponseDataDataMap map[string]interface{}
func (SchemaGetResponseDataDataMap) ImplementsSchemaGetResponseDataDataUnion ¶
func (r SchemaGetResponseDataDataMap) ImplementsSchemaGetResponseDataDataUnion()
type SchemaGetResponseDataDataUnion ¶
type SchemaGetResponseDataDataUnion interface {
ImplementsSchemaGetResponseDataDataUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, SchemaGetResponseDataDataArray, SchemaGetResponseDataDataMap or shared.UnionFloat.
type SchemaListParams ¶
type SchemaListParams struct {
// 游戏标识,不传则不过滤
GameKey param.Field[string] `query:"game_key"`
// schema 名称,不传则不过滤
Name param.Field[string] `query:"name"`
Page param.Field[int64] `query:"page"`
// 每页条数 默认 50
PageSize param.Field[int64] `query:"page_size"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SchemaListParams) URLQuery ¶
func (r SchemaListParams) URLQuery() (v url.Values)
URLQuery serializes SchemaListParams's query parameters as `url.Values`.
type SchemaListResponse ¶
type SchemaListResponse struct {
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Data SchemaListResponseDataUnion `json:"data,required,nullable"`
GameKey string `json:"game_key,required"`
Name string `json:"name,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
Uuid string `json:"uuid,required" format:"uuid"`
JSON schemaListResponseJSON `json:"-"`
}
func (*SchemaListResponse) UnmarshalJSON ¶
func (r *SchemaListResponse) UnmarshalJSON(data []byte) (err error)
type SchemaListResponseDataArray ¶
type SchemaListResponseDataArray []interface{}
func (SchemaListResponseDataArray) ImplementsSchemaListResponseDataUnion ¶
func (r SchemaListResponseDataArray) ImplementsSchemaListResponseDataUnion()
type SchemaListResponseDataMap ¶
type SchemaListResponseDataMap map[string]interface{}
func (SchemaListResponseDataMap) ImplementsSchemaListResponseDataUnion ¶
func (r SchemaListResponseDataMap) ImplementsSchemaListResponseDataUnion()
type SchemaListResponseDataUnion ¶
type SchemaListResponseDataUnion interface {
ImplementsSchemaListResponseDataUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, SchemaListResponseDataArray, SchemaListResponseDataMap or shared.UnionFloat.
type SchemaNewParams ¶
type SchemaNewParams struct {
Data param.Field[SchemaNewParamsDataUnion] `json:"data,required"`
// 游戏简写
GameKey param.Field[string] `json:"game_key,required"`
// 简要说明
Name param.Field[string] `json:"name,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SchemaNewParams) MarshalJSON ¶
func (r SchemaNewParams) MarshalJSON() (data []byte, err error)
type SchemaNewParamsDataArray ¶
type SchemaNewParamsDataArray []interface{}
func (SchemaNewParamsDataArray) ImplementsSchemaNewParamsDataUnion ¶
func (r SchemaNewParamsDataArray) ImplementsSchemaNewParamsDataUnion()
type SchemaNewParamsDataMap ¶
type SchemaNewParamsDataMap map[string]interface{}
func (SchemaNewParamsDataMap) ImplementsSchemaNewParamsDataUnion ¶
func (r SchemaNewParamsDataMap) ImplementsSchemaNewParamsDataUnion()
type SchemaNewParamsDataUnion ¶
type SchemaNewParamsDataUnion interface {
ImplementsSchemaNewParamsDataUnion()
}
Satisfied by shared.UnionString, shared.UnionBool, SchemaNewParamsDataArray, SchemaNewParamsDataMap, shared.UnionFloat.
type SchemaNewResponse ¶
type SchemaNewResponse struct {
Code int64 `json:"code,required"`
Data SchemaNewResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON schemaNewResponseJSON `json:"-"`
}
func (*SchemaNewResponse) UnmarshalJSON ¶
func (r *SchemaNewResponse) UnmarshalJSON(data []byte) (err error)
type SchemaNewResponseData ¶
type SchemaNewResponseData struct {
Uuid string `json:"uuid,required" format:"uuid"`
JSON schemaNewResponseDataJSON `json:"-"`
}
func (*SchemaNewResponseData) UnmarshalJSON ¶
func (r *SchemaNewResponseData) UnmarshalJSON(data []byte) (err error)
type SchemaService ¶
type SchemaService struct {
Options []option.RequestOption
}
SchemaService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSchemaService method instead.
func NewSchemaService ¶
func NewSchemaService(opts ...option.RequestOption) (r *SchemaService)
NewSchemaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SchemaService) Get ¶
func (r *SchemaService) Get(ctx context.Context, params SchemaGetParams, opts ...option.RequestOption) (res *SchemaGetResponse, err error)
获取 schema 详情
func (*SchemaService) List ¶
func (r *SchemaService) List(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[SchemaListResponse], err error)
获取 schema 列表
func (*SchemaService) ListAutoPaging ¶
func (r *SchemaService) ListAutoPaging(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[SchemaListResponse]
获取 schema 列表
func (*SchemaService) New ¶
func (r *SchemaService) New(ctx context.Context, params SchemaNewParams, opts ...option.RequestOption) (res *SchemaNewResponse, err error)
创建 schema
func (*SchemaService) Update ¶
func (r *SchemaService) Update(ctx context.Context, params SchemaUpdateParams, opts ...option.RequestOption) (res *SchemaUpdateResponse, err error)
修改 schema
type SchemaUpdateParams ¶
type SchemaUpdateParams struct {
Data param.Field[SchemaUpdateParamsDataUnion] `json:"data,required"`
// 游戏简写
GameKey param.Field[string] `json:"game_key,required"`
// 简要说明
Name param.Field[string] `json:"name,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SchemaUpdateParams) MarshalJSON ¶
func (r SchemaUpdateParams) MarshalJSON() (data []byte, err error)
type SchemaUpdateParamsDataArray ¶
type SchemaUpdateParamsDataArray []interface{}
func (SchemaUpdateParamsDataArray) ImplementsSchemaUpdateParamsDataUnion ¶
func (r SchemaUpdateParamsDataArray) ImplementsSchemaUpdateParamsDataUnion()
type SchemaUpdateParamsDataMap ¶
type SchemaUpdateParamsDataMap map[string]interface{}
func (SchemaUpdateParamsDataMap) ImplementsSchemaUpdateParamsDataUnion ¶
func (r SchemaUpdateParamsDataMap) ImplementsSchemaUpdateParamsDataUnion()
type SchemaUpdateParamsDataUnion ¶
type SchemaUpdateParamsDataUnion interface {
ImplementsSchemaUpdateParamsDataUnion()
}
Satisfied by shared.UnionString, shared.UnionBool, SchemaUpdateParamsDataArray, SchemaUpdateParamsDataMap, shared.UnionFloat.
type SchemaUpdateResponse ¶
type SchemaUpdateResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON schemaUpdateResponseJSON `json:"-"`
}
func (*SchemaUpdateResponse) UnmarshalJSON ¶
func (r *SchemaUpdateResponse) UnmarshalJSON(data []byte) (err error)
type Skui18nDataUnion ¶
type Skui18nDataUnion interface {
ImplementsSkui18nDataUnion()
}
Union satisfied by shared.UnionString, shared.UnionInt, shared.UnionBool, SKUI18nDataArray, SKUI18nDataMap or shared.UnionFloat.
type Spu ¶
type Spu struct {
// 记录创建时间
CreatedAt string `json:"created_at,required"`
// game_key
GameKey string `json:"game_key,required"`
// 是否缺失数据
HasMissing bool `json:"has_missing,required"`
// 多个卡的聚合
I18nData []SpuI18nData `json:"i18n_data,required"`
// 是否隐藏
IsHidden bool `json:"is_hidden,required"`
// 是否发布
IsPublished bool `json:"is_published,required"`
// spu 类型
Kind SpuKind `json:"kind,required"`
// 后台展示的名称
Name string `json:"name,required"`
// 关联的 qa uuid 列表
QaUuids []string `json:"qa_uuids,required"`
// 记录更新时间
UpdatedAt string `json:"updated_at,required"`
// spu uuid
Uuid string `json:"uuid,required"`
Extra SpuExtra `json:"extra"`
// 不同卡版本之间最早的发布时间
PublishedAt time.Time `json:"published_at,nullable" format:"date-time"`
JSON spuJSON `json:"-"`
}
func (*Spu) UnmarshalJSON ¶
type SpuExtra ¶
type SpuExtra struct {
// spu 别名数据
Aliases []string `json:"aliases"`
JSON spuExtraJSON `json:"-"`
}
func (*SpuExtra) UnmarshalJSON ¶
type SpuI18nData ¶
type SpuI18nData struct {
// 语言代码 (zh-CN,zh-TW,ja-JP,en-US 等等)
Language SpuI18nDataLanguage `json:"language,required"`
// 文本数据为 sku data 数据,格式参
// 考https://c1t2ed3gem.feishu.cn/wiki/PiTUwdwNbibqyukygjLcdRlpn6c?table=tbliqPTKMnXhFome&view=vewJ9UnMCE
Text SpuI18nDataTextUnion `json:"text,nullable"`
// 翻译提供者
Translator string `json:"translator"`
JSON spuI18nDataJSON `json:"-"`
}
func (*SpuI18nData) UnmarshalJSON ¶
func (r *SpuI18nData) UnmarshalJSON(data []byte) (err error)
type SpuI18nDataLanguage ¶
type SpuI18nDataLanguage string
语言代码 (zh-CN,zh-TW,ja-JP,en-US 等等)
const ( SpuI18nDataLanguageZhCn SpuI18nDataLanguage = "zh-CN" SpuI18nDataLanguageZhTw SpuI18nDataLanguage = "zh-TW" SpuI18nDataLanguageJaJp SpuI18nDataLanguage = "ja-JP" SpuI18nDataLanguageEnUs SpuI18nDataLanguage = "en-US" SpuI18nDataLanguageKoKr SpuI18nDataLanguage = "ko-KR" )
func (SpuI18nDataLanguage) IsKnown ¶
func (r SpuI18nDataLanguage) IsKnown() bool
type SpuI18nDataTextArray ¶
type SpuI18nDataTextArray []interface{}
func (SpuI18nDataTextArray) ImplementsSpuI18nDataTextUnion ¶
func (r SpuI18nDataTextArray) ImplementsSpuI18nDataTextUnion()
type SpuI18nDataTextMap ¶
type SpuI18nDataTextMap map[string]interface{}
func (SpuI18nDataTextMap) ImplementsSpuI18nDataTextUnion ¶
func (r SpuI18nDataTextMap) ImplementsSpuI18nDataTextUnion()
type SpuI18nDataTextUnion ¶
type SpuI18nDataTextUnion interface {
ImplementsSpuI18nDataTextUnion()
}
文本数据为 sku data 数据,格式参 考https://c1t2ed3gem.feishu.cn/wiki/PiTUwdwNbibqyukygjLcdRlpn6c?table=tbliqPTKMnXhFome&view=vewJ9UnMCE
Union satisfied by shared.UnionString, shared.UnionBool, SpuI18nDataTextArray, SpuI18nDataTextMap or shared.UnionFloat.
type StatisticOverviewParams ¶
type StatisticOverviewParams struct {
// 获取最近多少天的数据,默认 7 天
Day param.Field[int64] `query:"day"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (StatisticOverviewParams) URLQuery ¶
func (r StatisticOverviewParams) URLQuery() (v url.Values)
URLQuery serializes StatisticOverviewParams's query parameters as `url.Values`.
type StatisticOverviewResponse ¶
type StatisticOverviewResponse struct {
Code int64 `json:"code,required"`
Data StatisticOverviewResponseDataUnion `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id"`
JSON statisticOverviewResponseJSON `json:"-"`
}
func (*StatisticOverviewResponse) UnmarshalJSON ¶
func (r *StatisticOverviewResponse) UnmarshalJSON(data []byte) (err error)
type StatisticOverviewResponseData ¶
type StatisticOverviewResponseData []interface{}
func (StatisticOverviewResponseData) ImplementsStatisticOverviewResponseDataUnion ¶
func (r StatisticOverviewResponseData) ImplementsStatisticOverviewResponseDataUnion()
type StatisticOverviewResponseDataUnion ¶
type StatisticOverviewResponseDataUnion interface {
ImplementsStatisticOverviewResponseDataUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, StatisticOverviewResponseData, StatisticOverviewResponseData or shared.UnionFloat.
type StatisticOverviewSearchParams ¶
type StatisticOverviewSearchParams struct {
// 获取最近多少天的数据,默认 7 天
Day param.Field[int64] `json:"day,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (StatisticOverviewSearchParams) MarshalJSON ¶
func (r StatisticOverviewSearchParams) MarshalJSON() (data []byte, err error)
type StatisticOverviewSearchResponse ¶
type StatisticOverviewSearchResponse struct {
Code int64 `json:"code,required"`
Data StatisticOverviewSearchResponseDataUnion `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id"`
JSON statisticOverviewSearchResponseJSON `json:"-"`
}
func (*StatisticOverviewSearchResponse) UnmarshalJSON ¶
func (r *StatisticOverviewSearchResponse) UnmarshalJSON(data []byte) (err error)
type StatisticOverviewSearchResponseData ¶
type StatisticOverviewSearchResponseData []interface{}
func (StatisticOverviewSearchResponseData) ImplementsStatisticOverviewSearchResponseDataUnion ¶
func (r StatisticOverviewSearchResponseData) ImplementsStatisticOverviewSearchResponseDataUnion()
type StatisticOverviewSearchResponseDataUnion ¶
type StatisticOverviewSearchResponseDataUnion interface {
ImplementsStatisticOverviewSearchResponseDataUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, StatisticOverviewSearchResponseData, StatisticOverviewSearchResponseData or shared.UnionFloat.
type StatisticService ¶
type StatisticService struct {
Options []option.RequestOption
}
StatisticService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStatisticService method instead.
func NewStatisticService ¶
func NewStatisticService(opts ...option.RequestOption) (r *StatisticService)
NewStatisticService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StatisticService) Overview ¶
func (r *StatisticService) Overview(ctx context.Context, params StatisticOverviewParams, opts ...option.RequestOption) (res *StatisticOverviewResponse, err error)
看板统计信息查询
func (*StatisticService) OverviewSearch ¶
func (r *StatisticService) OverviewSearch(ctx context.Context, params StatisticOverviewSearchParams, opts ...option.RequestOption) (res *StatisticOverviewSearchResponse, err error)
看板统计信息查询
type SystemConfigDeleteParams ¶
type SystemConfigDeleteParams struct {
Key param.Field[string] `json:"key,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SystemConfigDeleteParams) MarshalJSON ¶
func (r SystemConfigDeleteParams) MarshalJSON() (data []byte, err error)
type SystemConfigDeleteResponse ¶
type SystemConfigDeleteResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON systemConfigDeleteResponseJSON `json:"-"`
}
func (*SystemConfigDeleteResponse) UnmarshalJSON ¶
func (r *SystemConfigDeleteResponse) UnmarshalJSON(data []byte) (err error)
type SystemConfigGetParams ¶
type SystemConfigGetParams struct {
Key param.Field[string] `query:"key,required"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SystemConfigGetParams) URLQuery ¶
func (r SystemConfigGetParams) URLQuery() (v url.Values)
URLQuery serializes SystemConfigGetParams's query parameters as `url.Values`.
type SystemConfigGetResponse ¶
type SystemConfigGetResponse struct {
Code int64 `json:"code,required"`
Data SystemConfigGetResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON systemConfigGetResponseJSON `json:"-"`
}
func (*SystemConfigGetResponse) UnmarshalJSON ¶
func (r *SystemConfigGetResponse) UnmarshalJSON(data []byte) (err error)
type SystemConfigGetResponseData ¶
type SystemConfigGetResponseData struct {
Key string `json:"key,required"`
Value SystemConfigGetResponseDataValueUnion `json:"value,required,nullable"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"`
Description string `json:"description"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON systemConfigGetResponseDataJSON `json:"-"`
}
func (*SystemConfigGetResponseData) UnmarshalJSON ¶
func (r *SystemConfigGetResponseData) UnmarshalJSON(data []byte) (err error)
type SystemConfigGetResponseDataValueArray ¶
type SystemConfigGetResponseDataValueArray []interface{}
func (SystemConfigGetResponseDataValueArray) ImplementsSystemConfigGetResponseDataValueUnion ¶
func (r SystemConfigGetResponseDataValueArray) ImplementsSystemConfigGetResponseDataValueUnion()
type SystemConfigGetResponseDataValueMap ¶
type SystemConfigGetResponseDataValueMap map[string]interface{}
func (SystemConfigGetResponseDataValueMap) ImplementsSystemConfigGetResponseDataValueUnion ¶
func (r SystemConfigGetResponseDataValueMap) ImplementsSystemConfigGetResponseDataValueUnion()
type SystemConfigGetResponseDataValueUnion ¶
type SystemConfigGetResponseDataValueUnion interface {
ImplementsSystemConfigGetResponseDataValueUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, SystemConfigGetResponseDataValueArray, SystemConfigGetResponseDataValueMap or shared.UnionFloat.
type SystemConfigListParams ¶
type SystemConfigListParams struct {
// 默认 1
Page param.Field[int64] `query:"page"`
// 默认 50
PageSize param.Field[int64] `query:"page_size"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SystemConfigListParams) URLQuery ¶
func (r SystemConfigListParams) URLQuery() (v url.Values)
URLQuery serializes SystemConfigListParams's query parameters as `url.Values`.
type SystemConfigListResponse ¶
type SystemConfigListResponse struct {
Key string `json:"key,required"`
Value SystemConfigListResponseValueUnion `json:"value,required,nullable"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"`
Description string `json:"description"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON systemConfigListResponseJSON `json:"-"`
}
func (*SystemConfigListResponse) UnmarshalJSON ¶
func (r *SystemConfigListResponse) UnmarshalJSON(data []byte) (err error)
type SystemConfigListResponseValueArray ¶
type SystemConfigListResponseValueArray []interface{}
func (SystemConfigListResponseValueArray) ImplementsSystemConfigListResponseValueUnion ¶
func (r SystemConfigListResponseValueArray) ImplementsSystemConfigListResponseValueUnion()
type SystemConfigListResponseValueMap ¶
type SystemConfigListResponseValueMap map[string]interface{}
func (SystemConfigListResponseValueMap) ImplementsSystemConfigListResponseValueUnion ¶
func (r SystemConfigListResponseValueMap) ImplementsSystemConfigListResponseValueUnion()
type SystemConfigListResponseValueUnion ¶
type SystemConfigListResponseValueUnion interface {
ImplementsSystemConfigListResponseValueUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, SystemConfigListResponseValueArray, SystemConfigListResponseValueMap or shared.UnionFloat.
type SystemConfigNewParams ¶
type SystemConfigNewParams struct {
Key param.Field[string] `json:"key,required"`
Value param.Field[SystemConfigNewParamsValueUnion] `json:"value,required"`
Description param.Field[string] `json:"description"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SystemConfigNewParams) MarshalJSON ¶
func (r SystemConfigNewParams) MarshalJSON() (data []byte, err error)
type SystemConfigNewParamsValueArray ¶
type SystemConfigNewParamsValueArray []interface{}
func (SystemConfigNewParamsValueArray) ImplementsSystemConfigNewParamsValueUnion ¶
func (r SystemConfigNewParamsValueArray) ImplementsSystemConfigNewParamsValueUnion()
type SystemConfigNewParamsValueMap ¶
type SystemConfigNewParamsValueMap map[string]interface{}
func (SystemConfigNewParamsValueMap) ImplementsSystemConfigNewParamsValueUnion ¶
func (r SystemConfigNewParamsValueMap) ImplementsSystemConfigNewParamsValueUnion()
type SystemConfigNewParamsValueUnion ¶
type SystemConfigNewParamsValueUnion interface {
ImplementsSystemConfigNewParamsValueUnion()
}
Satisfied by shared.UnionString, shared.UnionBool, SystemConfigNewParamsValueArray, SystemConfigNewParamsValueMap, shared.UnionFloat.
type SystemConfigNewResponse ¶
type SystemConfigNewResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON systemConfigNewResponseJSON `json:"-"`
}
func (*SystemConfigNewResponse) UnmarshalJSON ¶
func (r *SystemConfigNewResponse) UnmarshalJSON(data []byte) (err error)
type SystemConfigService ¶
type SystemConfigService struct {
Options []option.RequestOption
}
SystemConfigService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSystemConfigService method instead.
func NewSystemConfigService ¶
func NewSystemConfigService(opts ...option.RequestOption) (r *SystemConfigService)
NewSystemConfigService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SystemConfigService) Delete ¶
func (r *SystemConfigService) Delete(ctx context.Context, params SystemConfigDeleteParams, opts ...option.RequestOption) (res *SystemConfigDeleteResponse, err error)
删除系统配置
func (*SystemConfigService) Get ¶
func (r *SystemConfigService) Get(ctx context.Context, params SystemConfigGetParams, opts ...option.RequestOption) (res *SystemConfigGetResponse, err error)
获取系统配置
func (*SystemConfigService) List ¶
func (r *SystemConfigService) List(ctx context.Context, params SystemConfigListParams, opts ...option.RequestOption) (res *pagination.PageNumberPagination[SystemConfigListResponse], err error)
系统配置列表
func (*SystemConfigService) ListAutoPaging ¶
func (r *SystemConfigService) ListAutoPaging(ctx context.Context, params SystemConfigListParams, opts ...option.RequestOption) *pagination.PageNumberPaginationAutoPager[SystemConfigListResponse]
系统配置列表
func (*SystemConfigService) New ¶
func (r *SystemConfigService) New(ctx context.Context, params SystemConfigNewParams, opts ...option.RequestOption) (res *SystemConfigNewResponse, err error)
创建系统配置
func (*SystemConfigService) Update ¶
func (r *SystemConfigService) Update(ctx context.Context, params SystemConfigUpdateParams, opts ...option.RequestOption) (res *SystemConfigUpdateResponse, err error)
更新系统配置
type SystemConfigUpdateParams ¶
type SystemConfigUpdateParams struct {
Key param.Field[string] `json:"key,required"`
Value param.Field[SystemConfigUpdateParamsValueUnion] `json:"value,required"`
Description param.Field[string] `json:"description"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (SystemConfigUpdateParams) MarshalJSON ¶
func (r SystemConfigUpdateParams) MarshalJSON() (data []byte, err error)
type SystemConfigUpdateParamsValueArray ¶
type SystemConfigUpdateParamsValueArray []interface{}
func (SystemConfigUpdateParamsValueArray) ImplementsSystemConfigUpdateParamsValueUnion ¶
func (r SystemConfigUpdateParamsValueArray) ImplementsSystemConfigUpdateParamsValueUnion()
type SystemConfigUpdateParamsValueMap ¶
type SystemConfigUpdateParamsValueMap map[string]interface{}
func (SystemConfigUpdateParamsValueMap) ImplementsSystemConfigUpdateParamsValueUnion ¶
func (r SystemConfigUpdateParamsValueMap) ImplementsSystemConfigUpdateParamsValueUnion()
type SystemConfigUpdateParamsValueUnion ¶
type SystemConfigUpdateParamsValueUnion interface {
ImplementsSystemConfigUpdateParamsValueUnion()
}
Satisfied by shared.UnionString, shared.UnionBool, SystemConfigUpdateParamsValueArray, SystemConfigUpdateParamsValueMap, shared.UnionFloat.
type SystemConfigUpdateResponse ¶
type SystemConfigUpdateResponse struct {
Code int64 `json:"code,required"`
Data interface{} `json:"data,required,nullable"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON systemConfigUpdateResponseJSON `json:"-"`
}
func (*SystemConfigUpdateResponse) UnmarshalJSON ¶
func (r *SystemConfigUpdateResponse) UnmarshalJSON(data []byte) (err error)
type SystemConstantsParams ¶
type SystemConstantsResponse ¶
type SystemConstantsResponse struct {
Code int64 `json:"code,required"`
Data SystemConstantsResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON systemConstantsResponseJSON `json:"-"`
}
func (*SystemConstantsResponse) UnmarshalJSON ¶
func (r *SystemConstantsResponse) UnmarshalJSON(data []byte) (err error)
type SystemConstantsResponseData ¶
type SystemConstantsResponseData struct {
Games []SystemConstantsResponseDataGame `json:"games,required"`
Languages []SystemConstantsResponseDataLanguage `json:"languages,required"`
Regions []SystemConstantsResponseDataRegion `json:"regions,required"`
JSON systemConstantsResponseDataJSON `json:"-"`
}
func (*SystemConstantsResponseData) UnmarshalJSON ¶
func (r *SystemConstantsResponseData) UnmarshalJSON(data []byte) (err error)
type SystemConstantsResponseDataGame ¶
type SystemConstantsResponseDataGame struct {
GameKey string `json:"game_key,required"`
Name string `json:"name,required"`
JSON systemConstantsResponseDataGameJSON `json:"-"`
}
func (*SystemConstantsResponseDataGame) UnmarshalJSON ¶
func (r *SystemConstantsResponseDataGame) UnmarshalJSON(data []byte) (err error)
type SystemConstantsResponseDataLanguage ¶
type SystemConstantsResponseDataLanguage struct {
Language string `json:"language,required"`
Name string `json:"name,required"`
JSON systemConstantsResponseDataLanguageJSON `json:"-"`
}
func (*SystemConstantsResponseDataLanguage) UnmarshalJSON ¶
func (r *SystemConstantsResponseDataLanguage) UnmarshalJSON(data []byte) (err error)
type SystemConstantsResponseDataRegion ¶
type SystemConstantsResponseDataRegion struct {
Code []string `json:"code,required"`
Name string `json:"name,required"`
JSON systemConstantsResponseDataRegionJSON `json:"-"`
}
func (*SystemConstantsResponseDataRegion) UnmarshalJSON ¶
func (r *SystemConstantsResponseDataRegion) UnmarshalJSON(data []byte) (err error)
type SystemService ¶
type SystemService struct {
Options []option.RequestOption
Config *SystemConfigService
}
SystemService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSystemService method instead.
func NewSystemService ¶
func NewSystemService(opts ...option.RequestOption) (r *SystemService)
NewSystemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SystemService) Constants ¶
func (r *SystemService) Constants(ctx context.Context, query SystemConstantsParams, opts ...option.RequestOption) (res *SystemConstantsResponse, err error)
获取常量枚举定义
type TempCardSKURelation ¶
type TempCardSKURelation struct {
CardID int64 `json:"card_id,required"`
CardVersionID int64 `json:"card_version_id,required"`
Extra TempCardSKURelationExtraUnion `json:"extra,required,nullable"`
GameKey string `json:"game_key,required"`
Kind string `json:"kind,required"`
OriginalCardID int64 `json:"original_card_id,required"`
SKUUuid string `json:"sku_uuid,required" format:"uuid"`
SpuUuid string `json:"spu_uuid,required" format:"uuid"`
JSON tempCardSKURelationJSON `json:"-"`
}
func (*TempCardSKURelation) UnmarshalJSON ¶
func (r *TempCardSKURelation) UnmarshalJSON(data []byte) (err error)
type TempCardSKURelationExtraArray ¶
type TempCardSKURelationExtraArray []interface{}
func (TempCardSKURelationExtraArray) ImplementsTempCardSKURelationExtraUnion ¶
func (r TempCardSKURelationExtraArray) ImplementsTempCardSKURelationExtraUnion()
type TempCardSKURelationExtraMap ¶
type TempCardSKURelationExtraMap map[string]interface{}
func (TempCardSKURelationExtraMap) ImplementsTempCardSKURelationExtraUnion ¶
func (r TempCardSKURelationExtraMap) ImplementsTempCardSKURelationExtraUnion()
type TempCardSKURelationExtraUnion ¶
type TempCardSKURelationExtraUnion interface {
ImplementsTempCardSKURelationExtraUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, TempCardSKURelationExtraArray, TempCardSKURelationExtraMap or shared.UnionFloat.
type TempPackCollectionRelation ¶
type TempPackCollectionRelation struct {
CollectionUuid string `json:"collection_uuid,required"`
GameKey string `json:"game_key,required"`
Language string `json:"language,required"`
PackID int64 `json:"pack_id,required"`
JSON tempPackCollectionRelationJSON `json:"-"`
}
func (*TempPackCollectionRelation) UnmarshalJSON ¶
func (r *TempPackCollectionRelation) UnmarshalJSON(data []byte) (err error)
type UploadPresignedURLParams ¶
type UploadPresignedURLParams struct {
// 游戏简写,目前仅用于兼容老的数据结构
GameKey param.Field[string] `json:"game_key,required"`
TargetKey param.Field[string] `json:"target_key,required"`
FileHash param.Field[string] `json:"file_hash"`
// 单位(字节)
FileSize param.Field[int64] `json:"file_size"`
// 空时服务端生成,推荐客户端处理
Filename param.Field[string] `json:"filename"`
SkipAuth param.Field[bool] `header:"Skip-Auth"`
}
func (UploadPresignedURLParams) MarshalJSON ¶
func (r UploadPresignedURLParams) MarshalJSON() (data []byte, err error)
type UploadPresignedURLResponse ¶
type UploadPresignedURLResponse struct {
Code int64 `json:"code,required"`
Data UploadPresignedURLResponseData `json:"data,required"`
Msg string `json:"msg,required"`
TraceID string `json:"trace_id,required"`
JSON uploadPresignedURLResponseJSON `json:"-"`
}
func (*UploadPresignedURLResponse) UnmarshalJSON ¶
func (r *UploadPresignedURLResponse) UnmarshalJSON(data []byte) (err error)
type UploadPresignedURLResponseData ¶
type UploadPresignedURLResponseData struct {
CdnURL string `json:"cdn_url,required"`
Driver UploadPresignedURLResponseDataDriver `json:"driver,required"`
FileID string `json:"file_id,required" format:"uuid"`
Payload UploadPresignedURLResponseDataPayloadUnion `json:"payload,required,nullable"`
PreviewURL string `json:"preview_url,required"`
TargetURL string `json:"target_url,required"`
// 兼容老的上传路径
LegacyFilename string `json:"legacy_filename"`
JSON uploadPresignedURLResponseDataJSON `json:"-"`
}
func (*UploadPresignedURLResponseData) UnmarshalJSON ¶
func (r *UploadPresignedURLResponseData) UnmarshalJSON(data []byte) (err error)
type UploadPresignedURLResponseDataDriver ¶
type UploadPresignedURLResponseDataDriver string
const ( UploadPresignedURLResponseDataDriverR2 UploadPresignedURLResponseDataDriver = "r2" UploadPresignedURLResponseDataDriverTos UploadPresignedURLResponseDataDriver = "tos" UploadPresignedURLResponseDataDriverS3 UploadPresignedURLResponseDataDriver = "s3" )
func (UploadPresignedURLResponseDataDriver) IsKnown ¶
func (r UploadPresignedURLResponseDataDriver) IsKnown() bool
type UploadPresignedURLResponseDataPayload ¶
type UploadPresignedURLResponseDataPayload []interface{}
func (UploadPresignedURLResponseDataPayload) ImplementsUploadPresignedURLResponseDataPayloadUnion ¶
func (r UploadPresignedURLResponseDataPayload) ImplementsUploadPresignedURLResponseDataPayloadUnion()
type UploadPresignedURLResponseDataPayloadUnion ¶
type UploadPresignedURLResponseDataPayloadUnion interface {
ImplementsUploadPresignedURLResponseDataPayloadUnion()
}
Union satisfied by shared.UnionString, shared.UnionBool, UploadPresignedURLResponseDataPayload, UploadPresignedURLResponseDataPayload or shared.UnionFloat.
type UploadService ¶
type UploadService struct {
Options []option.RequestOption
}
UploadService contains methods and other services that help with interacting with the tcgwiki API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUploadService method instead.
func NewUploadService ¶
func NewUploadService(opts ...option.RequestOption) (r *UploadService)
NewUploadService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UploadService) PresignedURL ¶
func (r *UploadService) PresignedURL(ctx context.Context, params UploadPresignedURLParams, opts ...option.RequestOption) (res *UploadPresignedURLResponse, err error)
https://c1t2ed3gem.feishu.cn/wiki/XJzGwLl9XiK3g8kuJVKcigrmnGb