Skip to content

Commit 395da17

Browse files
committed
1, Add InvokeDataAPIService interface, support invoke service of data api to get sql query result.
1 parent b485f72 commit 395da17

File tree

5 files changed

+175
-1
lines changed

5 files changed

+175
-1
lines changed

aliyun-python-sdk-iot/ChangeLog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-06-12 Version: 7.10.0
2+
1, Add InvokeDataAPIService interface, support invoke service of data api to get sql query result.
3+
2, Add GetDataAPIServiceDetail interface, support get data api's detail information.
4+
3, Add CreateDataAPIService interface, support create data api with sql statement.
5+
16
2019-05-09 Version: 7.9.0
27
1, Add LoRa's API GetNodesAddingTask, QueryLoRaJoinPermissions, GetLoraNodesTask, CreateLoRaNodesTask
38

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "7.9.0"
1+
__version__ = '7.10.0'
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
class CreateDataAPIServiceRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Iot', '2018-01-20', 'CreateDataAPIService','iot')
25+
26+
def get_ResponseParams(self):
27+
return self.get_body_params().get('ResponseParams')
28+
29+
def set_ResponseParams(self,ResponseParams):
30+
for i in range(len(ResponseParams)):
31+
if ResponseParams[i].get('Name') is not None:
32+
self.add_body_params('ResponseParam.' + str(i + 1) + '.Name' , ResponseParams[i].get('Name'))
33+
if ResponseParams[i].get('Type') is not None:
34+
self.add_body_params('ResponseParam.' + str(i + 1) + '.Type' , ResponseParams[i].get('Type'))
35+
if ResponseParams[i].get('Required') is not None:
36+
self.add_body_params('ResponseParam.' + str(i + 1) + '.Required' , ResponseParams[i].get('Required'))
37+
if ResponseParams[i].get('Desc') is not None:
38+
self.add_body_params('ResponseParam.' + str(i + 1) + '.Desc' , ResponseParams[i].get('Desc'))
39+
if ResponseParams[i].get('Example') is not None:
40+
self.add_body_params('ResponseParam.' + str(i + 1) + '.Example' , ResponseParams[i].get('Example'))
41+
42+
43+
def get_OriginSql(self):
44+
return self.get_query_params().get('OriginSql')
45+
46+
def set_OriginSql(self,OriginSql):
47+
self.add_query_param('OriginSql',OriginSql)
48+
49+
def get_DisplayName(self):
50+
return self.get_query_params().get('DisplayName')
51+
52+
def set_DisplayName(self,DisplayName):
53+
self.add_query_param('DisplayName',DisplayName)
54+
55+
def get_ApiPath(self):
56+
return self.get_query_params().get('ApiPath')
57+
58+
def set_ApiPath(self,ApiPath):
59+
self.add_query_param('ApiPath',ApiPath)
60+
61+
def get_RequestParams(self):
62+
return self.get_body_params().get('RequestParams')
63+
64+
def set_RequestParams(self,RequestParams):
65+
for i in range(len(RequestParams)):
66+
if RequestParams[i].get('Name') is not None:
67+
self.add_body_params('RequestParam.' + str(i + 1) + '.Name' , RequestParams[i].get('Name'))
68+
if RequestParams[i].get('Type') is not None:
69+
self.add_body_params('RequestParam.' + str(i + 1) + '.Type' , RequestParams[i].get('Type'))
70+
if RequestParams[i].get('Required') is not None:
71+
self.add_body_params('RequestParam.' + str(i + 1) + '.Required' , RequestParams[i].get('Required'))
72+
if RequestParams[i].get('Desc') is not None:
73+
self.add_body_params('RequestParam.' + str(i + 1) + '.Desc' , RequestParams[i].get('Desc'))
74+
if RequestParams[i].get('Example') is not None:
75+
self.add_body_params('RequestParam.' + str(i + 1) + '.Example' , RequestParams[i].get('Example'))
76+
77+
78+
def get_FolderId(self):
79+
return self.get_query_params().get('FolderId')
80+
81+
def set_FolderId(self,FolderId):
82+
self.add_query_param('FolderId',FolderId)
83+
84+
def get_TemplateSql(self):
85+
return self.get_query_params().get('TemplateSql')
86+
87+
def set_TemplateSql(self,TemplateSql):
88+
self.add_query_param('TemplateSql',TemplateSql)
89+
90+
def get_Desc(self):
91+
return self.get_query_params().get('Desc')
92+
93+
def set_Desc(self,Desc):
94+
self.add_query_param('Desc',Desc)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
class GetDataAPIServiceDetailRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Iot', '2018-01-20', 'GetDataAPIServiceDetail','iot')
25+
26+
def get_ApiSrn(self):
27+
return self.get_query_params().get('ApiSrn')
28+
29+
def set_ApiSrn(self,ApiSrn):
30+
self.add_query_param('ApiSrn',ApiSrn)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
class InvokeDataAPIServiceRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Iot', '2018-01-20', 'InvokeDataAPIService','iot')
25+
26+
def get_ApiSrn(self):
27+
return self.get_query_params().get('ApiSrn')
28+
29+
def set_ApiSrn(self,ApiSrn):
30+
self.add_query_param('ApiSrn',ApiSrn)
31+
32+
def get_Params(self):
33+
return self.get_body_params().get('Params')
34+
35+
def set_Params(self,Params):
36+
for i in range(len(Params)):
37+
if Params[i].get('ListParamType') is not None:
38+
self.add_body_params('Param.' + str(i + 1) + '.ListParamType' , Params[i].get('ListParamType'))
39+
for j in range(len(Params[i].get('ListParamValues'))):
40+
if Params[i].get('ListParamValues')[j] is not None:
41+
self.add_body_params('Param.' + str(i + 1) + '.ListParamValue.'+str(j + 1), Params[i].get('ListParamValues')[j])
42+
if Params[i].get('ParamValue') is not None:
43+
self.add_body_params('Param.' + str(i + 1) + '.ParamValue' , Params[i].get('ParamValue'))
44+
if Params[i].get('ParamName') is not None:
45+
self.add_body_params('Param.' + str(i + 1) + '.ParamName' , Params[i].get('ParamName'))

0 commit comments

Comments
 (0)