forked from rdkcentral/rdkservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScreenCapture.json
74 lines (73 loc) · 3.03 KB
/
ScreenCapture.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
"$schema": "https://raw.githubusercontent.com/rdkcentral/rdkservices/main/Tools/json_generator/schemas/interface.schema.json",
"jsonrpc": "2.0",
"info": {
"title": "ScreenCapture API",
"class": "ScreenCapture",
"description": "The `ScreenCapture` plugin is used to upload screen captures."
},
"common": {
"$ref": "../common/common.json"
},
"definitions": {
},
"methods":{
"uploadScreenCapture":{
"summary": "Takes a screenshot and uploads it to the specified URL. A screenshot is uploaded using raw HTTP POST request as binary image/png data. It's the same as running the following command: \n`wget -d -q -O - --header='Content-Type: application/octet-stream' --post-file=/path/to/screenshot.png http://server/cgi-bin/upload.cgi` \nor, \n`curl -F image=@/path/to/screenshot.png http://server/cgi-bin/upload.cgi` \nFor implementation details, see `bool ScreenCapture::uploadDataToUrl(std::vector<unsigned char> &data, const char *url, std::string &error_str)`.",
"events": {
"uploadComplete" : "Triggered after uploading a screen capture with status and message"
},
"params": {
"type":"object",
"properties": {
"url":{
"summary": "The upload destination",
"type": "string",
"example": "http://server/cgi-bin/upload.cgi"
},
"callGUID":{
"summary": "A unique identifier of a call. The identifier is used to find a corresponding `uploadComplete` event",
"type": "string",
"example": "12345"
}
},
"required": [
"url"
]
},
"result": {
"$ref": "#/common/result"
}
}
},
"events":{
"uploadComplete": {
"summary": "Triggered after uploading a screen capture",
"params": {
"type": "object",
"properties": {
"status":{
"summary": "Indicates if the upload was successful",
"type": "boolean",
"example": true
},
"message": {
"summary": "A `Success` value indicates that the upload was successful; otherwise, a description of the failure",
"type": "string",
"example": "Success"
},
"call_guid": {
"summary": "A unique identifier of the call",
"type": "string",
"example": "12345"
}
},
"required": [
"status",
"message",
"call_guid"
]
}
}
}
}