| 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. |
|---|
export class BaseResponse
{
public Total: number;
public OpCode: number;
public ErrorText: string;
public RequestTime: string;
public ResponseTime: string;
public TotalExecutionTime: string;
public CachedResponse: boolean;
public PermitAccess: boolean;
public AccessDeniedMessage: string;
public constructor(init?: Partial<BaseResponse>) { (Object as any).assign(this, init); }
}
export class NodeDto
{
public Id: number;
public Name: string;
public Description: string;
public FeaturedImageUrl: string;
public FeaturedImageAttribution: string;
public FlagCode: string;
public CountryName: string;
public SortingPosition: number;
public NodeChildrenCountLive: number;
public CollectibleChildrenCountLive: number;
public ParentNode_Id?: number;
public RootNode_Id?: number;
public ChildNodes: NodeDto[];
public constructor(init?: Partial<NodeDto>) { (Object as any).assign(this, init); }
}
export class NodeResponse extends BaseResponse
{
public Data: NodeDto[];
public constructor(init?: Partial<NodeResponse>) { super(init); (Object as any).assign(this, init); }
}
/** @description Retrieve a node */
// @Api(Description="Retrieve a node")
export class GetNodeRequest
{
public NodeId: number;
public constructor(init?: Partial<GetNodeRequest>) { (Object as any).assign(this, init); }
}
TypeScript GetNodeRequest 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 /GetNodeRequest HTTP/1.1 Host: cpgpublicapiv2dev.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
}