v0.7.0: public domain types in rudder, hide OpenAPI names from callers
CI / build (push) Successful in 51s
CI / build (push) Successful in 51s
This commit is contained in:
+4
-4
@@ -15,10 +15,10 @@ type InventoryService struct {
|
||||
|
||||
type AdjustInventoryParameters struct {
|
||||
IdempotencyKey string
|
||||
Items []models.BatchAdjustPlayerInventoryItemsItem
|
||||
Items []InventoryAdjustment
|
||||
}
|
||||
|
||||
func (s *InventoryService) Adjust(ctx context.Context, parameters AdjustInventoryParameters) ([]models.InventoryItem, error) {
|
||||
func (s *InventoryService) Adjust(ctx context.Context, parameters AdjustInventoryParameters) ([]InventoryItem, error) {
|
||||
body := models.BatchAdjustPlayerInventoryItemsRequest{
|
||||
IdempotencyKey: parameters.IdempotencyKey,
|
||||
Items: parameters.Items,
|
||||
@@ -36,7 +36,7 @@ type ListInventoryParameters struct {
|
||||
Cursor *string
|
||||
}
|
||||
|
||||
func (s *InventoryService) List(ctx context.Context, playerID string, parameters ListInventoryParameters) (*models.GetPlayerInventoryResponse, error) {
|
||||
func (s *InventoryService) List(ctx context.Context, playerID string, parameters ListInventoryParameters) (*InventoryList, error) {
|
||||
query := url.Values{}
|
||||
if parameters.Limit > 0 {
|
||||
query.Set("limit", strconv.Itoa(parameters.Limit))
|
||||
@@ -45,7 +45,7 @@ func (s *InventoryService) List(ctx context.Context, playerID string, parameters
|
||||
query.Set("cursor", *parameters.Cursor)
|
||||
}
|
||||
|
||||
var response models.GetPlayerInventoryResponse
|
||||
var response InventoryList
|
||||
if err := s.transport.do(ctx, http.MethodGet, "/players/"+url.PathEscape(playerID)+"/inventory", query, nil, &response); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user