🌐 AI搜索 & 代理 主页
Skip to content

Commit 4ee9768

Browse files
committed
Update request examples list
1 parent ccb9ac1 commit 4ee9768

24 files changed

+286
-133
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"id": 82,
1111
"linkType": "JsonValue",
1212
"folder": "DE",
13-
"ownerName": "Test1",
14-
"name": "DE test1"
13+
"ownerName": "DataEditor",
14+
"name": "example-1"
1515
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"id": 78,
77
"linkType": "JsonValue",
88
"folder": "DE",
9-
"ownerName": "Test1",
10-
"name": "DE test2",
9+
"ownerName": "DataEditor",
10+
"name": "example-2",
1111
"description": "test"
1212
}

requests/Simple-Grid3.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

requests/ViewRequest.json

Lines changed: 0 additions & 53 deletions
This file was deleted.

requests/chart/createChartTab.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"scripts": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/chart/createChartTab.jspy",
3+
"isPublic": true,
4+
"id": 89,
5+
"linkType": "MultiRequest",
6+
"folder": "Charts",
7+
"ownerName": "chart",
8+
"name": "createChartTab"
9+
}

requests/chart/createChartTab.jspy

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# test script
2+
res1 = runRequest("Test1.Authentication", False, False)
3+
showInObjectExplorer(res1.body, "Authentication")
4+
selectBody = {}
5+
selectBody.fields = ["Country", "City", "Sales"]
6+
setContextVariable("selectBody", selectBody)
7+
requestName = "test1.select-query-test"
8+
res2 = runRequest(requestName, True, False)
9+
print(res2)
10+
chartConfig = {"chartType": "Bar", "bindingX": "City", "header": "City Sales"}
11+
plotChart(res2.body, "Chart Config", chartConfig)
12+
13+
createChartTab("Summary")
14+
.x("City")
15+
.y("Sales")
16+
.plot(res2.body)
17+
18+
res3 = P.httpGet("https://restcountries.eu/rest/v2/region/oceania").json()
19+
print(res3)
20+
21+
createChartTab("Oceania",
22+
r =>
23+
r.header = "Oceania population & area"
24+
)
25+
.x("alpha3Code",
26+
r =>
27+
r.title = "Countries"
28+
)
29+
.y("area",
30+
r =>
31+
r.tooltipContent = "<b>Area</b><br/>{y} sqr meters"
32+
)
33+
.ySecondaryAxis(
34+
r =>
35+
r.min = 1000
36+
r.max = 30000000
37+
r.title = "Population"
38+
)
39+
.y("population",
40+
r =>
41+
r.chartType = "Bar"
42+
)
43+
.plot(res3)

requests/createChartTab.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

requests/grid/grid-example.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"scripts": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/grid/grid-example.jspy",
3+
"isPublic": true,
4+
"id": 91,
5+
"linkType": "MultiRequest",
6+
"folder": "Grids",
7+
"ownerName": "grid",
8+
"name": "grid-example"
9+
}

requests/grid/grid-example.jspy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
data = httpGet("https://restcountries.eu/rest/v2/region/oceania")
2+
print(data)
3+
createGridTab("Table")
4+
.column("name",
5+
r =>
6+
r.headerText = "Country"
7+
)
8+
.column("alpha3Code",
9+
r =>
10+
r.allowSorting = false
11+
)
12+
.hidecolumn("alpha2Code")
13+
.show(data)
14+
15+
createGridTab("Table2").show(data)

requests/index.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,74 +3,74 @@
33
"id": 72,
44
"linkType": "MultiRequest",
55
"folder": "pscript examples",
6-
"ownerName": "Test1",
6+
"ownerName": "script",
77
"name": "products-query.pscript",
8-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/products-query.pscript.json"
8+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/script/products-query.pscript.json"
99
},
1010
{
1111
"id": 76,
1212
"linkType": "RestRequest",
1313
"folder": "Tests",
14-
"ownerName": "Test1",
14+
"ownerName": "request",
1515
"name": "ViewRequest",
1616
"description": "View test request",
17-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/ViewRequest.json"
17+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/request/ViewRequest.json"
1818
},
1919
{
2020
"id": 77,
2121
"linkType": "MultiRequest",
2222
"folder": "Tests",
23-
"ownerName": "Test1",
23+
"ownerName": "request",
2424
"name": "test-view-request",
25-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/test-view-request.json"
25+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/request/test-view-request.json"
2626
},
2727
{
2828
"id": 78,
2929
"linkType": "JsonValue",
3030
"folder": "DE",
31-
"ownerName": "Test1",
32-
"name": "DE test1",
31+
"ownerName": "DataEditor",
32+
"name": "example-1",
3333
"description": "test",
34-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/DE-test1.json"
34+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/DataEditor/example-1.json"
3535
},
3636
{
3737
"id": 82,
3838
"linkType": "JsonValue",
3939
"folder": "DE",
40-
"ownerName": "Test1",
41-
"name": "DE test2",
42-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/DE-test2.json"
40+
"ownerName": "DataEditor",
41+
"name": "example-2",
42+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/DataEditor/example-2.json"
4343
},
4444
{
4545
"id": 89,
4646
"linkType": "MultiRequest",
4747
"folder": "Charts",
48-
"ownerName": "Test1",
48+
"ownerName": "chart",
4949
"name": "createChartTab",
50-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/createChartTab.json"
50+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/chart/createChartTab.json"
5151
},
5252
{
5353
"id": 91,
5454
"linkType": "MultiRequest",
5555
"folder": "Grids",
56-
"ownerName": "Test1",
57-
"name": "Simple Grid3",
58-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/Simple-Grid3.json"
56+
"ownerName": "grid",
57+
"name": "grid-example",
58+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/grid/grid-example.json"
5959
},
6060
{
6161
"id": 101,
6262
"linkType": "MultiRequest",
6363
"folder": "Tests",
64-
"ownerName": "Test1",
64+
"ownerName": "params",
6565
"name": "params",
66-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/params.json"
66+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/params/params.json"
6767
},
6868
{
6969
"id": 103,
7070
"linkType": "MultiRequest",
7171
"folder": "Tests",
72-
"ownerName": "vkuku",
73-
"name": "params-vk",
74-
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/params-vk.json"
72+
"ownerName": "params",
73+
"name": "params-1",
74+
"link": "https://raw.githubusercontent.com/jspython-dev/jspython-examples/master/requests/params/params-1.json"
7575
}
7676
]

0 commit comments

Comments
 (0)