Procházet zdrojové kódy

Add GetVideoPlayAuth API parameter.

sdk-team před 4 roky
rodič
revize
54a8427771

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2021-11-02 Version: 1.36.919
+- Add GetVideoPlayAuth API parameter.
+
 2021-11-02 Version: 1.36.918
 - Support multi language.
 

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.918
+1.36.919

+ 6 - 3
vod/include/alibabacloud/vod/model/GetVideoPlayAuthRequest.h

@@ -35,19 +35,22 @@ namespace AlibabaCloud
 				GetVideoPlayAuthRequest();
 				~GetVideoPlayAuthRequest();
 
-				std::string getVideoId()const;
-				void setVideoId(const std::string& videoId);
 				std::string getReAuthInfo()const;
 				void setReAuthInfo(const std::string& reAuthInfo);
 				std::string getPlayConfig()const;
 				void setPlayConfig(const std::string& playConfig);
+				std::string getVideoId()const;
+				void setVideoId(const std::string& videoId);
+				std::string getApiVersion()const;
+				void setApiVersion(const std::string& apiVersion);
 				long getAuthInfoTimeout()const;
 				void setAuthInfoTimeout(long authInfoTimeout);
 
             private:
-				std::string videoId_;
 				std::string reAuthInfo_;
 				std::string playConfig_;
+				std::string videoId_;
+				std::string apiVersion_;
 				long authInfoTimeout_;
 
 			};

+ 1 - 1
vod/include/alibabacloud/vod/model/GetVideoPlayAuthResult.h

@@ -37,8 +37,8 @@ namespace AlibabaCloud
 					std::string status;
 					std::string videoId;
 					std::string title;
-					std::string coverURL;
 					float duration;
+					std::string coverURL;
 				};
 
 

+ 3 - 3
vod/src/VodClient.cc

@@ -31,21 +31,21 @@ VodClient::VodClient(const Credentials &credentials, const ClientConfiguration &
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vod");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 VodClient::VodClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vod");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 VodClient::VodClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "vod");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
 }
 
 VodClient::~VodClient()

+ 22 - 11
vod/src/model/GetVideoPlayAuthRequest.cc

@@ -27,17 +27,6 @@ GetVideoPlayAuthRequest::GetVideoPlayAuthRequest() :
 GetVideoPlayAuthRequest::~GetVideoPlayAuthRequest()
 {}
 
-std::string GetVideoPlayAuthRequest::getVideoId()const
-{
-	return videoId_;
-}
-
-void GetVideoPlayAuthRequest::setVideoId(const std::string& videoId)
-{
-	videoId_ = videoId;
-	setParameter("VideoId", videoId);
-}
-
 std::string GetVideoPlayAuthRequest::getReAuthInfo()const
 {
 	return reAuthInfo_;
@@ -60,6 +49,28 @@ void GetVideoPlayAuthRequest::setPlayConfig(const std::string& playConfig)
 	setParameter("PlayConfig", playConfig);
 }
 
+std::string GetVideoPlayAuthRequest::getVideoId()const
+{
+	return videoId_;
+}
+
+void GetVideoPlayAuthRequest::setVideoId(const std::string& videoId)
+{
+	videoId_ = videoId;
+	setParameter("VideoId", videoId);
+}
+
+std::string GetVideoPlayAuthRequest::getApiVersion()const
+{
+	return apiVersion_;
+}
+
+void GetVideoPlayAuthRequest::setApiVersion(const std::string& apiVersion)
+{
+	apiVersion_ = apiVersion;
+	setParameter("ApiVersion", apiVersion);
+}
+
 long GetVideoPlayAuthRequest::getAuthInfoTimeout()const
 {
 	return authInfoTimeout_;

+ 4 - 4
vod/src/model/GetVideoPlayAuthResult.cc

@@ -40,16 +40,16 @@ void GetVideoPlayAuthResult::parse(const std::string &payload)
 	reader.parse(payload, value);
 	setRequestId(value["RequestId"].asString());
 	auto videoMetaNode = value["VideoMeta"];
-	if(!videoMetaNode["CoverURL"].isNull())
-		videoMeta_.coverURL = videoMetaNode["CoverURL"].asString();
-	if(!videoMetaNode["Duration"].isNull())
-		videoMeta_.duration = std::stof(videoMetaNode["Duration"].asString());
 	if(!videoMetaNode["Status"].isNull())
 		videoMeta_.status = videoMetaNode["Status"].asString();
+	if(!videoMetaNode["Duration"].isNull())
+		videoMeta_.duration = std::stof(videoMetaNode["Duration"].asString());
 	if(!videoMetaNode["Title"].isNull())
 		videoMeta_.title = videoMetaNode["Title"].asString();
 	if(!videoMetaNode["VideoId"].isNull())
 		videoMeta_.videoId = videoMetaNode["VideoId"].asString();
+	if(!videoMetaNode["CoverURL"].isNull())
+		videoMeta_.coverURL = videoMetaNode["CoverURL"].asString();
 	if(!value["PlayAuth"].isNull())
 		playAuth_ = value["PlayAuth"].asString();