| GET | /GetMarketplaceAdRequest | Either Gsid or PCGS is required, not both. |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse:
total: int = 0
op_code: int = 0
error_text: Optional[str] = None
request_time: Optional[str] = None
response_time: Optional[str] = None
total_execution_time: Optional[str] = None
cached_response: bool = False
permit_access: bool = False
access_denied_message: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MarketplaceAdItemDto:
title: Optional[str] = None
is_auction: bool = False
auction_ends: Optional[datetime.datetime] = None
buy_now_price: Decimal = decimal.Decimal(0)
view_item_url: Optional[str] = None
image_url: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MarketplaceAdResponse(BaseResponse):
data: Optional[List[MarketplaceAdItemDto]] = None
# @Api(Description="Get CDN Marketplace ads")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetMarketplaceAdRequest:
"""
Get CDN Marketplace ads
"""
gsid: int = 0
pcgs: Optional[str] = None
number_of_items: int = 0
Python GetMarketplaceAdRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /GetMarketplaceAdRequest HTTP/1.1 Host: marketingapidev.greysheet.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Data:
[
{
Title: String,
IsAuction: False,
AuctionEnds: 0001-01-01,
BuyNowPrice: 0,
ViewItemUrl: String,
ImageUrl: String
}
],
Total: 0,
OpCode: 0,
ErrorText: String,
RequestTime: String,
ResponseTime: String,
TotalExecutionTime: String,
CachedResponse: False,
PermitAccess: False,
AccessDeniedMessage: String
}