| GET | /GetNodeRequest | When NodeChildrenCountLive > 0 then this is a leaf node and has Node children. If CollectibleChildrenCountLive > 0 then the node has collectible children. There is no advanced APi version for this call. |
|---|
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 NodeDto:
id: int = 0
name: Optional[str] = None
description: Optional[str] = None
featured_image_url: Optional[str] = None
featured_image_attribution: Optional[str] = None
flag_code: Optional[str] = None
country_name: Optional[str] = None
sorting_position: int = 0
node_children_count_live: int = 0
collectible_children_count_live: int = 0
parent_node__id: Optional[int] = None
root_node__id: Optional[int] = None
child_nodes: Optional[List[NodeDto]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class NodeResponse(BaseResponse):
data: Optional[List[NodeDto]] = None
# @Api(Description="Retrieve a node")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetNodeRequest:
"""
Retrieve a node
"""
node_id: int = 0
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 /GetNodeRequest HTTP/1.1 Host: publicapiv2dev.greysheet.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Data:
[
{
Id: 0,
Name: String,
Description: String,
FeaturedImageUrl: String,
FeaturedImageAttribution: String,
FlagCode: String,
CountryName: String,
SortingPosition: 0,
NodeChildrenCountLive: 0,
CollectibleChildrenCountLive: 0,
ParentNode_Id: 0,
RootNode_Id: 0,
ChildNodes:
[
{
Id: 0,
Name: String,
Description: String,
FeaturedImageUrl: String,
FeaturedImageAttribution: String,
FlagCode: String,
CountryName: String,
SortingPosition: 0,
NodeChildrenCountLive: 0,
CollectibleChildrenCountLive: 0,
ParentNode_Id: 0,
RootNode_Id: 0,
ChildNodes:
[
{
Id: 0,
Name: String,
Description: String,
FeaturedImageUrl: String,
FeaturedImageAttribution: String,
FlagCode: String,
CountryName: String,
SortingPosition: 0,
NodeChildrenCountLive: 0,
CollectibleChildrenCountLive: 0,
ParentNode_Id: 0,
RootNode_Id: 0
}
]
}
]
}
],
Total: 0,
OpCode: 0,
ErrorText: String,
RequestTime: String,
ResponseTime: String,
TotalExecutionTime: String,
CachedResponse: False,
PermitAccess: False,
AccessDeniedMessage: String
}