| GET,PUT,DELETE,OPTIONS | /v1/lobby/content/{LobbyContentId} | ||
|---|---|---|---|
| GET,POST,OPTIONS | /v1/lobby/content |
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 LobbyContentItem:
lobby_content_id: int = 0
title: Optional[str] = None
kind: Optional[str] = None
has_media: bool = False
media_url: Optional[str] = None
headline: Optional[str] = None
body: Optional[str] = None
accent: Optional[str] = None
url: Optional[str] = None
dwell_sec: int = 0
starts_at: Optional[datetime.datetime] = None
ends_at: Optional[datetime.datetime] = None
days_mask: int = 0
hour_from: Optional[int] = None
hour_to: Optional[int] = None
is_third_party: bool = False
status: Optional[str] = None
all_branches: bool = False
branch_ids: List[str] = field(default_factory=list)
plays7d: int = 0
on_now: bool = False
sort_order: int = 0
created_by: Optional[str] = None
updated_at: Optional[datetime.datetime] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LobbyContentResponse:
response_status: Optional[ResponseStatus] = None
items: List[LobbyContentItem] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LobbyContentRequest:
lobby_content_id: int = 0
item: Optional[LobbyContentItem] = None
Python LobbyContentRequest 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.
POST /v1/lobby/content HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
LobbyContentId: 0,
Item:
{
LobbyContentId: 0,
Title: String,
Kind: String,
HasMedia: False,
MediaUrl: String,
Headline: String,
Body: String,
Accent: String,
Url: String,
DwellSec: 0,
StartsAt: 0001-01-01,
EndsAt: 0001-01-01,
DaysMask: 0,
HourFrom: 0,
HourTo: 0,
IsThirdParty: False,
Status: String,
AllBranches: False,
BranchIds:
[
00000000000000000000000000000000
],
Plays7d: 0,
OnNow: False,
SortOrder: 0,
CreatedBy: String,
UpdatedAt: 0001-01-01
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Items:
[
{
LobbyContentId: 0,
Title: String,
Kind: String,
HasMedia: False,
MediaUrl: String,
Headline: String,
Body: String,
Accent: String,
Url: String,
DwellSec: 0,
StartsAt: 0001-01-01,
EndsAt: 0001-01-01,
DaysMask: 0,
HourFrom: 0,
HourTo: 0,
IsThirdParty: False,
Status: String,
AllBranches: False,
BranchIds:
[
00000000000000000000000000000000
],
Plays7d: 0,
OnNow: False,
SortOrder: 0,
CreatedBy: String,
UpdatedAt: 0001-01-01
}
]
}