Skip to content

Commit 9a04358

Browse files
committed
Generated Darabonba for AliGenie-oauth2_1.0.
1 parent d3da460 commit 9a04358

File tree

7 files changed

+279
-101
lines changed

7 files changed

+279
-101
lines changed

aligenie-oauth2_1_0/Teafile

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scope": "alibabacloud",
33
"name": "AliGenieoauth2_1_0",
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"main": "./main.tea",
66
"maintainers": [
77
{
@@ -23,12 +23,12 @@
2323
}
2424
},
2525
"releases": {
26-
"java": "com.aliyun:aligenieoauth2_1_0:1.3.2",
27-
"go": "github.com/alibabacloud-go/aligenie-oauth2_1_0/client:v1.0.0",
28-
"csharp": "AlibabaCloud.SDK.AliGenieoauth2_1_0:1.0.0",
29-
"ts": "@alicloud/aligenieoauth2_1_0:1.0.0",
30-
"php": "alibabacloud/aligenie-oauth2_1_0:1.0.1",
31-
"python": "alibabacloud_aligenieoauth2_1_0:1.0.0",
26+
"java": "com.aliyun:aligenieoauth2_1_0:1.4.0",
27+
"go": "github.com/alibabacloud-go/aligenie-oauth2_1_0/client:v1.1.0",
28+
"csharp": "AlibabaCloud.SDK.AliGenieoauth2_1_0:1.1.0",
29+
"ts": "@alicloud/aligenieoauth2_1_0:1.1.0",
30+
"php": "alibabacloud/aligenie-oauth2_1_0:1.1.0",
31+
"python": "alibabacloud_aligenieoauth2_1_0:1.1.0",
3232
"python2": "alibabacloud_aligenieoauth2_1_0_py2:0.0.1",
3333
"swift": "alibabacloud-sdk-swift/aligenie-oauth2_1_0:1.0.0"
3434
},

aligenie-oauth2_1_0/api-info.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"version": "oauth2_1.0",
44
"apiDoc": {
55
"hasDoc": [
6-
"ExecuteScene",
7-
"GetUserBasicInfo",
86
"GetUserPhone",
97
"QueryDeviceList",
10-
"OAuth2TokenEndpoint",
11-
"GetSceneList",
128
"OAuth2RevocationEndpoint",
13-
"PushDeviceNotification"
9+
"PushDeviceNotification",
10+
"ExecuteScene",
11+
"GetSceneList",
12+
"CreatePlayingList",
13+
"GetUserBasicInfo",
14+
"OAuth2TokenEndpoint"
1415
],
1516
"noDoc": []
1617
},

aligenie-oauth2_1_0/async/api-info.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"version": "oauth2_1.0",
44
"apiDoc": {
55
"hasDoc": [
6-
"OAuth2RevocationEndpoint",
7-
"GetSceneList",
86
"ExecuteScene",
9-
"QueryDeviceList",
7+
"OAuth2TokenEndpoint",
108
"GetUserBasicInfo",
9+
"OAuth2RevocationEndpoint",
10+
"QueryDeviceList",
11+
"GetSceneList",
1112
"PushDeviceNotification",
12-
"OAuth2TokenEndpoint",
13-
"GetUserPhone"
13+
"GetUserPhone",
14+
"CreatePlayingList"
1415
],
1516
"noDoc": []
1617
},

aligenie-oauth2_1_0/async/main.dara

+43
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,49 @@ function close(): void {
3030
@handler.close();
3131
}
3232

33+
model CreatePlayingListRequest {
34+
deviceInfo: {
35+
encodeKey: string(name='EncodeKey', description='This parameter is required.', example='123'),
36+
encodeType: string(name='EncodeType', description='This parameter is required.', example='UC_CLIENT_ID'),
37+
id: string(name='Id', description='This parameter is required.', example='123'),
38+
idType: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
39+
organizationId?: string(name='OrganizationId', example='1'),
40+
}(name='DeviceInfo', description='This parameter is required.', shrink='json', position='Query'),
41+
openCreatePlayingListRequest: {
42+
contentList: [
43+
{
44+
rawId: string(name='RawId', description='This parameter is required.', example='12345'),
45+
source: string(name='Source', description='This parameter is required.', example='ximalayaH5'),
46+
}
47+
](name='ContentList', description='This parameter is required.'),
48+
contentType: string(name='ContentType', description='This parameter is required.', example='content'),
49+
extendInfo?: map[string]any(name='ExtendInfo', example='{}'),
50+
index?: int32(name='Index', example='1'),
51+
needAlbumContinued?: boolean(name='NeedAlbumContinued', example='true'),
52+
playFrom?: string(name='PlayFrom', example='default'),
53+
playMode?: string(name='PlayMode', example='Normal'),
54+
}(name='OpenCreatePlayingListRequest', description='This parameter is required.', shrink='json', position='Body'),
55+
}
56+
57+
model CreatePlayingListResponseBody = {
58+
requestId?: string(name='RequestId', example='10002398812'),
59+
}
60+
61+
model CreatePlayingListResponse = {
62+
headers?: map[string]string(name='headers'),
63+
statusCode?: int32(name='statusCode'),
64+
body?: CreatePlayingListResponseBody(name='body'),
65+
}
66+
67+
/**
68+
* @param request the request parameters of CreatePlayingList CreatePlayingListRequest
69+
* @return CreatePlayingListResponse
70+
*/
71+
async function createPlayingList(request: CreatePlayingListRequest): CreatePlayingListResponse {
72+
@handler.validateRequestModel(request);
73+
return @handler.do('RESTFUL', 'CreatePlayingList', 'POST', '/v1.0/oauth2/content/playing/create', 'json', true, 'form', request);
74+
}
75+
3376
model ExecuteSceneRequest {
3477
sceneId?: string(name='SceneId', example='a84a55aa410e460a9ac753570c76fecc', position='Body'),
3578
}

aligenie-oauth2_1_0/main.tea

+106-40
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,104 @@ function getEndpoint(productId: string, regionId: string, endpointRule: string,
2828
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
2929
}
3030

31+
model CreatePlayingListRequest {
32+
deviceInfo?: {
33+
encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
34+
encodeType?: string(name='EncodeType', description='This parameter is required.', example='UC_CLIENT_ID'),
35+
id?: string(name='Id', description='This parameter is required.', example='123'),
36+
idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
37+
organizationId?: string(name='OrganizationId', example='1'),
38+
}(name='DeviceInfo', description='This parameter is required.'),
39+
openCreatePlayingListRequest?: {
40+
contentList?: [
41+
{
42+
rawId?: string(name='RawId', description='This parameter is required.', example='12345'),
43+
source?: string(name='Source', description='This parameter is required.', example='ximalayaH5'),
44+
}
45+
](name='ContentList', description='This parameter is required.'),
46+
contentType?: string(name='ContentType', description='This parameter is required.', example='content'),
47+
extendInfo?: map[string]any(name='ExtendInfo', example='{}'),
48+
index?: int32(name='Index', example='1'),
49+
needAlbumContinued?: boolean(name='NeedAlbumContinued', example='true'),
50+
playFrom?: string(name='PlayFrom', example='default'),
51+
playMode?: string(name='PlayMode', example='Normal'),
52+
}(name='OpenCreatePlayingListRequest', description='This parameter is required.'),
53+
}
54+
55+
model CreatePlayingListShrinkRequest {
56+
deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
57+
openCreatePlayingListRequestShrink?: string(name='OpenCreatePlayingListRequest', description='This parameter is required.'),
58+
}
59+
60+
model CreatePlayingListResponseBody = {
61+
requestId?: string(name='RequestId', example='10002398812'),
62+
}
63+
64+
model CreatePlayingListResponse = {
65+
headers?: map[string]string(name='headers'),
66+
statusCode?: int32(name='statusCode'),
67+
body?: CreatePlayingListResponseBody(name='body'),
68+
}
69+
70+
/**
71+
* @summary 创建播放列表
72+
*
73+
* @param tmpReq CreatePlayingListRequest
74+
* @param headers map
75+
* @param runtime runtime options for this request RuntimeOptions
76+
* @return CreatePlayingListResponse
77+
*/
78+
async function createPlayingListWithOptions(tmpReq: CreatePlayingListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreatePlayingListResponse {
79+
Util.validateModel(tmpReq);
80+
var request = new CreatePlayingListShrinkRequest{};
81+
OpenApiUtil.convert(tmpReq, request);
82+
if (!Util.isUnset(tmpReq.deviceInfo)) {
83+
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
84+
}
85+
if (!Util.isUnset(tmpReq.openCreatePlayingListRequest)) {
86+
request.openCreatePlayingListRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openCreatePlayingListRequest, 'OpenCreatePlayingListRequest', 'json');
87+
}
88+
var query : map[string]any = {};
89+
if (!Util.isUnset(request.deviceInfoShrink)) {
90+
query['DeviceInfo'] = request.deviceInfoShrink;
91+
}
92+
93+
var body : map[string]any = {};
94+
if (!Util.isUnset(request.openCreatePlayingListRequestShrink)) {
95+
body['OpenCreatePlayingListRequest'] = request.openCreatePlayingListRequestShrink;
96+
}
97+
98+
var req = new OpenApi.OpenApiRequest{
99+
headers = headers,
100+
query = OpenApiUtil.query(query),
101+
body = OpenApiUtil.parseToMap(body),
102+
};
103+
var params = new OpenApi.Params{
104+
action = 'CreatePlayingList',
105+
version = 'oauth2_1.0',
106+
protocol = 'HTTPS',
107+
pathname = `/v1.0/oauth2/content/playing/create`,
108+
method = 'POST',
109+
authType = 'AK',
110+
style = 'ROA',
111+
reqBodyType = 'formData',
112+
bodyType = 'json',
113+
};
114+
return callApi(params, req, runtime);
115+
}
116+
117+
/**
118+
* @summary 创建播放列表
119+
*
120+
* @param request CreatePlayingListRequest
121+
* @return CreatePlayingListResponse
122+
*/
123+
async function createPlayingList(request: CreatePlayingListRequest): CreatePlayingListResponse {
124+
var runtime = new Util.RuntimeOptions{};
125+
var headers : map[string]string = {};
126+
return createPlayingListWithOptions(request, headers, runtime);
127+
}
128+
31129
model ExecuteSceneRequest {
32130
sceneId?: string(name='SceneId', example='a84a55aa410e460a9ac753570c76fecc'),
33131
}
@@ -72,11 +170,7 @@ async function executeSceneWithOptions(request: ExecuteSceneRequest, headers: ma
72170
reqBodyType = 'formData',
73171
bodyType = 'json',
74172
};
75-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
76-
return callApi(params, req, runtime);
77-
} else {
78-
return execute(params, req, runtime);
79-
}
173+
return callApi(params, req, runtime);
80174
}
81175

82176
/**
@@ -129,11 +223,7 @@ async function getSceneListWithOptions(headers: map[string]string, runtime: Util
129223
reqBodyType = 'json',
130224
bodyType = 'json',
131225
};
132-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
133-
return callApi(params, req, runtime);
134-
} else {
135-
return execute(params, req, runtime);
136-
}
226+
return callApi(params, req, runtime);
137227
}
138228

139229
/**
@@ -188,11 +278,7 @@ async function getUserBasicInfoWithOptions(headers: map[string]string, runtime:
188278
reqBodyType = 'json',
189279
bodyType = 'json',
190280
};
191-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
192-
return callApi(params, req, runtime);
193-
} else {
194-
return execute(params, req, runtime);
195-
}
281+
return callApi(params, req, runtime);
196282
}
197283

198284
/**
@@ -239,11 +325,7 @@ async function getUserPhoneWithOptions(headers: map[string]string, runtime: Util
239325
reqBodyType = 'json',
240326
bodyType = 'json',
241327
};
242-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
243-
return callApi(params, req, runtime);
244-
} else {
245-
return execute(params, req, runtime);
246-
}
328+
return callApi(params, req, runtime);
247329
}
248330

249331
/**
@@ -321,11 +403,7 @@ async function oAuth2RevocationEndpointWithOptions(request: OAuth2RevocationEndp
321403
reqBodyType = 'formData',
322404
bodyType = 'json',
323405
};
324-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
325-
return callApi(params, req, runtime);
326-
} else {
327-
return execute(params, req, runtime);
328-
}
406+
return callApi(params, req, runtime);
329407
}
330408

331409
/**
@@ -417,11 +495,7 @@ async function oAuth2TokenEndpointWithOptions(request: OAuth2TokenEndpointReques
417495
reqBodyType = 'formData',
418496
bodyType = 'json',
419497
};
420-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
421-
return callApi(params, req, runtime);
422-
} else {
423-
return execute(params, req, runtime);
424-
}
498+
return callApi(params, req, runtime);
425499
}
426500

427501
/**
@@ -510,11 +584,7 @@ async function pushDeviceNotificationWithOptions(tmpReq: PushDeviceNotificationR
510584
reqBodyType = 'formData',
511585
bodyType = 'json',
512586
};
513-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
514-
return callApi(params, req, runtime);
515-
} else {
516-
return execute(params, req, runtime);
517-
}
587+
return callApi(params, req, runtime);
518588
}
519589

520590
/**
@@ -577,11 +647,7 @@ async function queryDeviceListWithOptions(headers: map[string]string, runtime: U
577647
reqBodyType = 'json',
578648
bodyType = 'json',
579649
};
580-
if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
581-
return callApi(params, req, runtime);
582-
} else {
583-
return execute(params, req, runtime);
584-
}
650+
return callApi(params, req, runtime);
585651
}
586652

587653
/**

aligenie-oauth2_1_0/v2/api-info.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"version": "oauth2_1.0",
44
"apiDoc": {
55
"hasDoc": [
6-
"OAuth2TokenEndpoint",
76
"ExecuteScene",
8-
"QueryDeviceList",
9-
"GetUserBasicInfo",
107
"GetSceneList",
8+
"PushDeviceNotification",
119
"GetUserPhone",
10+
"GetUserBasicInfo",
1211
"OAuth2RevocationEndpoint",
13-
"PushDeviceNotification"
12+
"QueryDeviceList",
13+
"OAuth2TokenEndpoint",
14+
"CreatePlayingList"
1415
],
1516
"noDoc": []
1617
},

0 commit comments

Comments
 (0)