The first step, in this example, is to create the story story01.
1. Create the story with identifier story01. The handle is 1 because the CreateObject method applies at app level.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "CreateObject",
"handle": 1,
"params": [
{
"title": "A Story",
"description": "This is the story",
"qInfo": {
"qId": "story01",
"qType": "story"
},
"qChildListDef": {
"qData": {
"title": "/title",
"description": "/description",
"children": "/qChildListDef"
}
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 2
},
"qInfo": {
"qId": "story01",
"qType": "story"
}
},
"change": [
2
]
}
The story story01 is created and has 2 as a handle.
For more information, see the CreateObject method.
2. Remove the slide with identifier slide01. The handle is 1 because the DestroyObject method applies at app level.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "DestroyChild",
"handle": 3,
"params": [
"slide01"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qSuccess": true }
}
The slide slide01 is successfully removed.
For more information, see the
3. Remove the story with identifier story01. The handle is 1 because the DestroyObject method applies at app level.
The client sends:
{
"jsonrpc": "2.0",
"id": 5,
"method": "DestroyObject",
"handle": 1,
"params": [
"story01"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"qSuccess": true
},
"close": [
2,
3
]
}
The story story01 is successfully removed.
For more information, see the DestroyObject method.